MCPcopy Create free account
hub / github.com/dresende/node-orm2 / convertTimezone

Function convertTimezone

lib/Drivers/DML/sqlite.js:373–381  ·  view source on GitHub ↗
(tz)

Source from the content-addressed store, hash-verified

371});
372
373function convertTimezone(tz) {
374 if (tz == "Z") return 0;
375
376 var m = tz.match(/([\+\-\s])(\d\d):?(\d\d)?/);
377 if (m) {
378 return (m[1] == '-' ? -1 : 1) * (parseInt(m[2], 10) + ((m[3] ? parseInt(m[3], 10) : 0) / 60)) * 60;
379 }
380 return false;
381}

Callers 1

sqlite.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected