#1 : 21/12-16 00:32 Scott
Posts: 1
|
So I have filenames that are in epoch time like this: 1482272002750.mp4
I would like to be able to convert them to date/time in my current time zone (eastern) like this: 2016-12-20_17-13-22 I just learned of epoch time today, but I cannot seem to find where that would be in this program. |
#2 : 21/12-16 04:22 G. Lambany
Posts: 187
|
Reply to #1:
should be pretty close to what you want. Not very elegantly coded, but who cares right.. couldn't find a format function that works in spidermonkey. btw, your epoch time is way, way into the future, like year 48 000, dunno if we're looking at the same datetime format. http://pastebin.com/ZqqwrgR4 cheers |
#3 : 21/12-16 21:15 G. Lambany
Posts: 187
|
Reply to #1:
Err... my bad, your epoch time seems to include even milliseconds, so this code will work http://pastebin.com/73ZcgzpA cheers |