248 Posts
Giuse
7 years ago
Topic

I tested the new calendar field with Klas patch (https://github.com/Octopoos/SEBLOD/pull/412) in the backend and found a bug about dealing with timezones.

Context: Joomla timezone is set to UTC -5 (where the server is based) while admin user has a timezone of UTC + 1 plus daylight saving (where I am).

  • I enter a date of today at 00:00
  • in the DB it is saved as today at 00:00 => wrong since it does not handle user timezone (it should store yesterday at 22:00)
  • in the form after save I see today at 2 pm am => here the timezone is handled

If confirmed, I open an issue on github.

cheers and thanks

Giuse

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
11
Level 1

Please post your fields configuration. And info how do you enter value (using calendar, using manual input, live value, default value ? ).

248 Posts
Giuse
7 years ago
10
Level 2

the field configuration is quite simple and standard:

  • no default value
  • show time = Show. Show week numbers and today = Hide
  • Storage = standard / User / birthday

The problem is selecting values with the popup calendar (manual input is not supported in this field like in the Picker Calendar). In the first post I wrote 2 pm but I meant 2 am. It seems as user timezone is not considered when storing a new value, it is considered when retrieving the saved value.

Cheers

Giuse

248 Posts
Giuse
7 years ago
9
Level 3

Hi, do I open an issue on GitHub?

cheers

Giuse

4229 Posts
Kadministrator
7 years ago
8
Level 4

HI, please try with updated patch. 

To open an issue log in and go to

https://github.com/Octopoos/SEBLOD/issues

248 Posts
Giuse
7 years ago
7
Level 5

tried with the new version but it seems not ok: if I enter 12:00 in the field and my timezone is +2, it is saved as 12:00.

4229 Posts
Kadministrator
7 years ago
1
Level 6

I retested and It works fine for me, are you sure you applied new version? 

And when you say "it is saved as 12:00" - did you check directly in db or somewhere else?

248 Posts
Giuse
7 years ago
0
Level 7

confirmed fixed in 3.11.1

47 Posts
zaliyanna
7 years ago
4
Level 6

Hello, I still have the same pb datetime in seblod is +2 than the time stored in database.

I updated seblod to 3.11 .3 but I still have the pb


Thanks for your reply

4229 Posts
Kadministrator
7 years ago
3
Level 7

Time is stored in UTC to the databse, so uless you live in UTC timezone there will always be difference between dispalyed and stored time. I times in seblod are wrong you should adjust your server and/or site timezone.

47 Posts
zaliyanna
7 years ago
2
Level 8

Hello thanks for your reply

I set time in server configuration to  UTC so I that means that only the UTC time count but I still have difference in seblod . for ex when I put 14h with seblod calendar in database I see 12h  so there is always difference between seblod and joomla server.

4229 Posts
Kadministrator
7 years ago
1
Level 9

also Joomla timezone setting (and User timezone setting if different than Joomla) need to be in utc

47 Posts
zaliyanna
7 years ago
0
Level 10

ah ok I changed the user time and it seems to be ok 

thanks,

3 years ago
1
Level 1

Hi

A few years later I have the same issue on frontend only:

my Jform field is set with the 'server timezone' config

I set the joomla timezone to Europe/Paris and the user timezone to default. The Joomla jform calendar stores the date with the UTC time. so far so good..

But in this if case the jform field displays the right time (with time offset) in the form view, it still displays the raw (UTC) time in the content or list views !

what did I miss please?

thanks

cyril

3 years ago
0
Level 2

Hello

Found a sloution with a DATE typo plugin on the date field + setting the right timezone in the joomla control panel.

thanks

cyril

Get a VIP membership