#NEWLINE# def strptime( datestring , format ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# tt = localtime ( float ( JS ( "strptime(@{{datestring}}['valueOf'](), @{{format}}['valueOf']())['getTime']() / 1000.0" ) ) ) #NEWLINE# tt . tm_isdst = ( - 1 ) #NEWLINE# return tt #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid or unsupported values for strptime: '%s', '%s'" % ( datestring , format ) ) )