Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_date: in memory timestamp should be UTC #1506

Closed
wants to merge 1 commit into from

Conversation

rdoursenaud
Copy link
Contributor

This induced a subtle hour bug because the dol_print_date() on the following lines were expecting an UTC timestamp.

Please also merge to 3.4, 3.5 and develop (do not cherry_pick).

@eldy
Copy link
Member

eldy commented Mar 30, 2014

I pushed a better fix into 3.5
Yours is wrong because you suppose: in memory, timestamp should be UTC
This is what it should be. However, dolibarr was not designed with this rule (historical reason), and the rule that is currently running is: in memory, timestamp are according to PHP server timezone.

I clean code for each version to prepare to switch with correct rule, but before that i fixed the function to match the rule that is followed by all other functions.

@eldy eldy closed this Mar 30, 2014
@rdoursenaud
Copy link
Contributor Author

Well, I didn't suppose, I red the wiki:
http://wiki.dolibarr.org/index.php/Language_and_development_rules#Dates_and_Timezones

If these aren't the current rules, this needs to be updated.

Anyway, without this fix, the time support I added to project tasks is broken and any automatic dol_print_date() for that matter.

Could you reference the commit where you added your better fix, please, so I can test? Just copy/paste the reference hash, GitHub does the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants