Commit ca13b4e5 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed issue with IST India Standard time time zone

parent 98c2ed0b
......@@ -184,11 +184,19 @@ Ext.define('PO.Utilities', {
hh = (h = d.getHours()) < 10 ? ('0'+h) : h;
mm = (m = d.getMinutes()) < 10 ? ('0'+m) : m;
ss = (s = d.getSeconds()) < 10 ? ('0'+s) : s;
// Handle time zone. Time zones with fractions of an hour need to be added with ':30'
tzSign = (tzo = d.getTimezoneOffset()/-60) < 0 ? '-' : '+';
tz = (tzAbs = Math.abs(tzo)) < 10 ? ('0'+tzAbs) : ''+tzAbs;
return YYYY+'-'+MM+'-'+DD+' '+hh+':'+mm+':'+ss+tzSign+tz;
tzAbs = Math.abs(tzo);
if (Math.floor(tzAbs) != tzAbs) {
tzAbsFrac = ':30';
tzAbs = Math.floor(tzAbs);
} else {
tzAbsFrac = '';
}
tz = tzAbs < 10 ? ('0'+tzAbs) : ''+tzAbs;
return YYYY+'-'+MM+'-'+DD+' '+hh+':'+mm+':'+ss+tzSign+tz+tzAbsFrac;
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment