[{"data":1,"prerenderedAt":158},["ShallowReactive",2],{"page:/date-to-timestamp":3},{"id":4,"title":5,"body":6,"description":134,"extension":135,"eyebrow":136,"faq":137,"locale":147,"meta":148,"navigation":149,"pageType":150,"path":151,"related":152,"seo":153,"stem":156,"__hash__":157},"pages/en/date-to-timestamp.md","Date to Unix timestamp",{"type":7,"value":8,"toc":124},"minimark",[9,14,23,27,34,38,41,45,48,52,111,115],[10,11,13],"h2",{"id":12},"from-a-calendar-value-to-an-instant","From a calendar value to an instant",[15,16,17,18,22],"p",{},"Choose UTC or a named IANA time zone before converting. The input uses an unambiguous year-month-day control, so values such as ",[19,20,21],"code",{},"03/04/26"," cannot silently change between regional date conventions. The selected zone determines the instant; changing only the output unit does not.",[10,24,26],{"id":25},"seconds-or-milliseconds","Seconds or milliseconds?",[15,28,29,30,33],{},"Seconds are common in Unix utilities and many backend systems. Milliseconds are the native unit for JavaScript ",[19,31,32],{},"Date",". Microseconds and nanoseconds are used by some databases and event pipelines; choosing a finer unit adds zeros when the source input has only millisecond precision.",[10,35,37],{"id":36},"daylight-saving-caveat","Daylight-saving caveat",[15,39,40],{},"Named-zone wall times can be missing or repeated during daylight-saving transitions. The converter rejects a nonexistent time during the spring-forward gap. If the clock repeats a local time in autumn, it shows both UTC offsets and asks you to choose the intended instant.",[10,42,44],{"id":43},"how-to-use-this-tool","How to use this tool",[15,46,47],{},"Enter a calendar date and time, select the zone in which that clock reading was observed, then choose the output unit and press Convert. The source zone interprets the date; it is not merely a label applied to a result.",[10,49,51],{"id":50},"worked-input-and-output","Worked input and output",[53,54,55,68],"table",{},[56,57,58],"thead",{},[59,60,61,65],"tr",{},[62,63,64],"th",{},"Input or setting",[62,66,67],{},"Expected result",[69,70,71,85,98],"tbody",{},[59,72,73,80],{},[74,75,76,79],"td",{},[19,77,78],{},"2023-11-14 22:13:20"," · UTC · s",[74,81,82],{},[19,83,84],{},"1700000000",[59,86,87,93],{},[74,88,89,92],{},[19,90,91],{},"2023-11-15 06:13:20"," · Asia/Shanghai · ms",[74,94,95],{},[19,96,97],{},"1700000000000",[59,99,100,106],{},[74,101,102,105],{},[19,103,104],{},"2023-11-14 22:13:20.123"," · UTC · ms",[74,107,108],{},[19,109,110],{},"1700000000123",[10,112,114],{"id":113},"checks-before-using-the-result","Checks before using the result",[15,116,117,118,123],{},"During a daylight-saving overlap, select the earlier or later offset explicitly. A skipped wall time is rejected. Whole-second output rounds down if the source has a fraction; choose milliseconds or a finer unit to retain supported input precision. Use the ",[119,120,122],"a",{"href":121},"/guides/time-zones-and-dst/","DST examples"," to distinguish a missing time from an invalid calendar date.",{"title":125,"searchDepth":126,"depth":126,"links":127},"",2,[128,129,130,131,132,133],{"id":12,"depth":126,"text":13},{"id":25,"depth":126,"text":26},{"id":36,"depth":126,"text":37},{"id":43,"depth":126,"text":44},{"id":50,"depth":126,"text":51},{"id":113,"depth":126,"text":114},"Turn a calendar date in UTC or a named IANA time zone into Unix seconds, milliseconds, microseconds or nanoseconds.","md","Epoch converter / 02",[138,141,144],{"question":139,"answer":140},"Why must I choose the input time zone?","The same calendar fields identify different instants in different zones. An explicit input zone makes the result unique and reproducible.",{"question":142,"answer":143},"How are daylight-saving transitions handled?","The converter rejects nonexistent spring-forward times and presents both UTC offsets when a fall-back local time occurs twice.",{"question":145,"answer":146},"Does selecting nanoseconds increase the input precision?","No. The date input has millisecond precision; a finer output unit represents the same instant with additional trailing zeros.","en",{},true,"tool","/en/date-to-timestamp",null,{"title":154,"description":155},"Date to Unix Timestamp Converter — Time Zone & DST Aware","Convert a date in UTC or an IANA time zone to Unix seconds, milliseconds, microseconds or nanoseconds with DST validation.","en/date-to-timestamp","knGQqZ2CDuX2qIMvhYYSQQZ2QlCzeZHDfprCI-n2Mto",1792032483047]