Converting datetime to Javascript milliseconds in epoch

1
2
3
4
from time import mktime

def datetime_to_ms_str(dt):
    return str(1000*mktime(dt.timetuple()))

More like this

  1. datetime.time/datetime.datetime to Unix Epoch (with microsecond support) by sleepycal 3 years ago
  2. caching parsed templates by forgems 5 years, 5 months ago
  3. Widget for DateTime values on Geraldo Reports by marinho 4 years, 1 month ago
  4. Percent Field by fylb 3 years, 3 months ago
  5. Comparing two json like python objects by nmb10 2 years, 6 months ago

Comments

(Forgotten your password?)