Closed (fixed)
Project:
Date
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2010 at 10:46 UTC
Updated:
6 Sep 2019 at 12:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
daniela basualdo commenteddid you solve the problem? i've got the same one...no idea how to fix!
Comment #2
hm2k commentedNo fix yet, however since the hour went back after British Summer Time (BST) to GMT the issue appears to have gone away.
Any ideas?
Comment #3
daniela basualdo commentedIn my case I solved the problem. Database Timezone is UTC and Webserver Timezone is CET. Drupal does add automatically the time-difference from +1 hour in winter or +2 hours in summer.
As I selected the date value directly from the database I had 1 hours less, logically. So i had to transform it first to a unix timestamp (because I used a datetime filed) and then i formatted the date with format_date(). You can find here the example that fixed my problem:
http://www.dominiquedecooman.com/blog/format-dates-drupal-way-use-core-f...
If you print out a date value from a node or view the transformation has already been done from drupal.
Comment #4
karens commentedThe value in the database is stored in UTC. If you try to print it without transforming it back to your local timezone this is what you will see. There is no bug in the code here.
Comment #7
aadesh.verma commentedHi,
i have also getting this issue & found this is related to library file (libraries/datetimepicker/build/jquery.datetimepicker.full.js). This problem occur when date is in 12 hour format. On blur event, its parse the date where its calculate the hours again & make 1 hour behind it. See the calculation of it.
y.hour=s+f-1 (where s is hour value, f = (0 if time in am & 12 if time in pm)
We have removed the -1 from this calculation & its solve the problem. see attached my patch.
Comment #8
aadesh.verma commentedHi,
Today, one of my friend @Aprajit have got 1 issue in my patch that is when we select 12AM / 12PM its not working. Its change the value from 12am to 12pm & vice versa.
I have fixed this issue with in updated patch (datetimepicker_fixes-2.patch ).