MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / DateTimeToJS

Function DateTimeToJS

src/NodeRTLib/ProjectFiles/NodeRtUtils.cpp:333–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333Local<Date> DateTimeToJS(::Windows::Foundation::DateTime value) {
334 // 116444736000000000 = The time 100 nanoseconds between 1/1/1970(UTC) to
335 // 1/1/1601(UTC) ux_time = (Current time since 1601 in 100 nano sec
336 // units)/10000 - 11644473600000;
337 return Nan::New<Date>(value.UniversalTime / 10000.0 - 11644473600000)
338 .ToLocalChecked();
339}
340
341bool StrToGuid(Local<Value> value, LPCLSID guid) {
342 if (value.IsEmpty() || !value->IsString()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected