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

Php Timezone #16118

Closed
Nicofol opened this issue Jan 30, 2021 · 14 comments
Closed

Php Timezone #16118

Nicofol opened this issue Jan 30, 2021 · 14 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@Nicofol
Copy link

Nicofol commented Jan 30, 2021

How is possible to solve? in Dolibarr previous version, the timezone was correct.

In dolibarr 13, the time zone is wrong (+1h).
Php 7.1.33 version.
The current time is now 23.59 (11.59PM)
The Dolibarr time is 00.59 (+1h)

Fuso orario attuale +1 (+3600)       Europe/Rome       Ora legale (utente): No     (Si in estate)
=> Orario PHP (server) 31/01/2021 00.58
=> dol_print_date(0,"dayhourtext") 01 gennaio 1970 01:00
=> dol_get_first_day(1970,1,false) -3600     (=> dol_print_date() or idate() of this value = 01/01/1970 00.00)
=> dol_get_first_day(1970,1,true) -3600     (=> dol_print_date() or idate() of this value = 01/01/1970 00.00)
TimeZone MySql (database) (database) CEST
Fuso orario client (utente) +1 (+3600)       Europe/Rome       Ora legale (utente): No
=> Orario client (utente) 31/01/2021 00.58
@Nicofol Nicofol added the Bug This is a bug (something does not work as expected) label Jan 30, 2021
@alyatis85
Copy link

Confirmed. Got the same. +1h when you create a ticket at 2:30 it prints 3:30
All TimeZone settings are prorperly set on server : 'Europe/Paris'
Thank for help

@ptibogxiv
Copy link
Contributor

@eldy i confirm this bug on all objects Invoice orders tickets...

@matDOTviguier
Copy link

Idem with my #16077 ?

@matDOTviguier
Copy link

@eldy dangerous event ahead.

@ptibogxiv
Copy link
Contributor

Idem with my #16077 ?

I Think it's the same bug

@matDOTviguier
Copy link

Yes, I apologize, I found it only on ticket at first time. the fix proposed is not good.
Time is shown correctly. It's a timestamp problem. No a tzdata related one.

@jcattan
Copy link

jcattan commented Feb 1, 2021

Confirmed. Got the same. +1h since upgrade dolibarr 13 version on my debian 10.7
tzdata , php and MAIN_SERVER_TZ are set Europe/Paris

@eldy
Copy link
Member

eldy commented Feb 1, 2021

@Nicofol What do you have if you enter "date" on command line on your server ?

@Nicofol
Copy link
Author

Nicofol commented Feb 1, 2021

I have not the SSH access because is a shared hosting server, not dedicated. Let me know what can I do if possible, tks. Perhaps the Php Ini can help? see attach...
Immagine 2021-02-01 222905

@eldy
Copy link
Member

eldy commented Feb 1, 2021

I pushed a fix. Thanks to check on demo.dolibarr.org if you find another error.
You will probably found other similar troubles on some other pages. We will have to fix them one by one.

@jcattan
Copy link

jcattan commented Feb 2, 2021

@Nicofol What do you have if you enter "date" on command line on your server ?

the date in ssh is correct : Tue Feb 2 07:54:04 CET 2021

@jcattan
Copy link

jcattan commented Feb 2, 2021

I pushed a fix. Thanks to check on demo.dolibarr.org if you find another error.
You will probably found other similar troubles on some other pages. We will have to fix them one by one.

the fix correct the bug for me
thanks

@matDOTviguier
Copy link

matDOTviguier commented Feb 2, 2021

@eldy are you to publish 13.0.1 in order to have a fast solution about it ? I cannot se milestones ...

@eldy eldy closed this as completed in daf8894 Feb 2, 2021
@alyatis85
Copy link

alyatis85 commented Feb 2, 2021 via email

AlexisLaurier added a commit to AlexisLaurier/dolibarr that referenced this issue Feb 9, 2021
Entity is not anymore check for user having permission $user->rights->societe->client->voir on the current entity. Then we can open object from any entity with current permissions and the entity field of objects are not anymore checked.
eldy added a commit that referenced this issue Feb 10, 2021
fix regression of #16118 - entity not check on object in checkUserAccessToObject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

6 participants