python - Datetime works in Windows, but not Debian -
When I try to run this code, I get an error on Debian, but it works on Windows.
def check time (): while true: open ('date.txt') as t: target = tar.read () current = str (datetime.strptime (str (date. Today), '% Y -% m-% d')) [: - 9] If datetime.strptime (current, '% Y-% m-% d') & gt; = Datetime.strptime (target, '% Y-% m-% d'): DoSomething () sleep (10) This gives me this error:
file "/usr/lib/python2.6/_strptime PE", line 328, _strum data_string [found.end ():]) Value error: unrelated data remains: date.txt includes:
2013-03-21 Both systems have the same date and time settings.
Michael Elkan