#!/usr/bin/env python """ Testing calling mktime() on the second before epoch. """ import sys from datetime import * from time import mktime for secs in 0, -1, -2: print print secs t = datetime.fromtimestamp(secs) print t tup = t.timetuple() print tup try: print mktime(tup) except OverflowError, e: print 'ERROR', e

AltStyle によって変換されたページ (->オリジナル) /