DateTimePicker timezone issue
In an action, I have checkboxes where upon checking/un-checking, the corresponding datetimepicker field is set to now()->format('Y-m-d H:i:s') otherwise null. Casted the db fields to 'datetime'. Applied the timezone() method to use current user's timezone.
Weird thing is, fields that are saved before and after applying timezone() are stored in database differently, the prior, stored in UTC & displayed as user timezone, the latter, stored in user's tz & displayed as UTC.
On top of that, for fields stored as UTC in db, when i uncheck/re-check to fill new timestamp, it displays as UTC, is that normal?
Below is the form:
0 Replies