- # calendar.timegm is the inverse of time.gmtime, in that it computes in UTC
- # surprisingly enough, no other method in the time module behaves this way
- # this method is documented in the time module's documentation
- timestamp = calendar.timegm (time.strptime (timestamp,Row.time_format))
- human = time.strftime (Row.time_format, time.gmtime(timestamp))
- if check_future and (timestamp < time.time()):
- raise PLCInvalidArgument, "%s: date must be in the future"%human
+ # calendar.timegm() is the inverse of time.gmtime()
+ timestamp = calendar.timegm(time.strptime(timestamp, time_format))
+
+ # Human readable timestamp string
+ human = time.strftime(time_format, time.gmtime(timestamp))
+
+ if check_future and timestamp < time.time():
+ raise PLCInvalidArgument, "'%s' not in the future" % human
+