pickadate.js icon indicating copy to clipboard operation
pickadate.js copied to clipboard

timezone handling

Open tisdall opened this issue 9 years ago • 2 comments

It's a little unclear from documentation, but I think pickadate.js simply uses the timezone of the browser and then submits content without any indication of the timezone of the browser. Is there any method to submit the timezone of the browser? I thought perhaps something in the format of pickatime(), but the docs don't show any way to do that.

tisdall avatar May 26 '15 15:05 tisdall

+1

andrewboni avatar May 29 '15 01:05 andrewboni

Well, for anyone else looking at this... I currently work around the problem by having a hidden field to record the timezone offset and then populate that with javascript. You get the timezone offset by:

    var dateobj = new Date();
    var offset = -dateobj.getTimezoneOffset();

tisdall avatar May 29 '15 14:05 tisdall