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. HTML/JS template filter to show localized dates/times by mback2k 5 years ago
  2. DateTimeFluxCapacitor by jbcurtin 3 years, 2 months ago
  3. Complete Persian DateTime Widget by serj1975 2 years, 4 months ago
  4. Converting a Flickr Datetime to a Python Datetime by obeattie 7 years, 1 month ago
  5. Parse datetime model field to string by jzelez 3 years, 9 months ago

Comments

(Forgotten your password?)