I'm trying to get the drupal time (Date and Time) to be set to Asian/Tehran but no luck.
My configurations is:
- installed the Calander Systems 6.x-1.50
- installed the Date module 6.x-2.7 ( http://drupal.org/project/date )
The calendar system has turned my calendar to Farsi/Persian just fine but then I installed the Date module just to ensure I can set exact timezone to Asian/Tehran;
It seems that the Date module has done its job okay and the Tehran time is showing, when I'm at the Time and Date looking at the format ( admin/settings/date-time/formats ) I see the time to be correct and shoiwing Tehran's time;
however, when I post some content (using create Content), after the content is posted, the time of the content post is shown incorrectly.
ie. say if the correct Tehran's time is 19:04 :
Time and Date Formats ( admin/settings/date-time/formats ) shows correctly: 19:04
but when posting any content the time of the post is shown incorrectly 8:04 instead of 19:04
Ps. It's only an issue with the TIME not the date. the date is whoing correctly.
I'm quite clueless as what is causing this, if you could kindly enlighten me with any hints, that would be great, ...?
thanks
Comments
Comment #1
ah0 commentedany pointers at all?
Thanks
Comment #2
farshid commentedtry this:
calendar_systems/calendar/v1/calendarV1.class.inc.php arround Line: 159 find:
and change it to:
this solved my problem... let me know if it works for you too.
Comment #3
sourcesoft commentedjust faced to this problem today.
around line 159 you referred to there's a function called phpDate using gmmaketime()
tried to change each date function to the one u mentioned and nothing's changed, after posting or updating a post there's a huge time difference.
needs to be fixed, I'm using 1.50 and time difference is still on
Comment #4
farshid commentedHi
have you set your time zone in: admin/settings/date-time ?
Comment #5
sourcesoft commentedyes it's asia/tehran.
Comment #6
ah0 commentedThank you so much guys it indeed did work just fine,
As farshid mentioned, just changed the
and change it to:
so the function becomes:
Once again a loads of appreciation,
Comment #7
sourcesoft commentedProblem solved for me, seems like I've hacked a little bit before to integrate with "scheduler" module and jalali calendar so scheduler was not using the right time.
Thank you, commit it.
Comment #8
sinasalek commentedThanks guys, will be included in the next minor release
Comment #9
ah0 commentedThanks Sina,
Regards,
Comment #10
sinasalek commentedAdding to the next minor release
Comment #11
sinasalek commentedFarshid has also provided a solution #1269226: Dates moving one day forward in range: 1357/01 to 1357/07 (Persian/Jalali Calendar)
Comment #12
sinasalek commentedFixed, try the latest release , if interested to know how it's been fixed have a look at http://drupalcode.org/project/calendar_systems.git/commit/e722d36
Comment #13
farshid commentedHi Sina
What about daylight savings? it is a while (from the beginning of new year, by the way happy new year :) ) our times are showing incorrectly due to +1 hour daylight saving.
I found that adding this offset to date function in iranian.class.inc.php could solve the problem, may be you prefer to add this in another, more appropriate place in the code:
replace:
with:
calendar_systems/calendar/v1/calendarSystems/iranian.class.inc.php
I do not know if you have this problem... or may be you have fixed it in new releases?
Thanks
Comment #14
sinasalek commentedCalendar systems deals with date, there are some solutions but haven't tried them http://drupal.org/project/dst ,http://drupal.org/node/11077
PS : Happy new year to u too
Comment #16
sinasalek commentedTagged