Created
December 30, 2016 02:56
-
-
Save b0n/533e406bbb9f6630a731b326d9ad75a1 to your computer and use it in GitHub Desktop.
30分間は同じ値です。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import datetime | |
import time | |
fmt = '%Y-%m-%d %H:%M' | |
add = datetime.timedelta(minutes=1) | |
start = datetime.datetime(2016, 12, 30, 17, 0, 0) | |
while(1) : | |
a = start.strftime(fmt) | |
#print start.strftime('%s') | |
#print (int)(start.strftime('%s')) | |
b = (int)(start.strftime('%s')) // ( 60 * 30 ) | |
print a, ' ', b | |
start = start + add | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment