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

Function convertTimezone

lib/Drivers/DML/postgres.js:355–366  ·  view source on GitHub ↗
(tz)

Source from the content-addressed store, hash-verified

353});
354
355function convertTimezone(tz) {
356 if (tz == "Z") {
357 return 0;
358 }
359
360 var m = tz.match(/([\+\-\s])(\d\d):?(\d\d)?/);
361
362 if (m) {
363 return (m[1] == '-' ? -1 : 1) * (parseInt(m[2], 10) + ((m[3] ? parseInt(m[3], 10) : 0) / 60)) * 60;
364 }
365 return false;
366}

Callers 1

postgres.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected