in reply to Lost in DateTime !
I try to to print this local time 23:55
If your local time zone is Europe/Paris (currently CEST / +0200), then note that your input time, '2017-06-10 21:55:00+02', is already in that time zone, so when you ->set_time_zone('Europe/Paris'), there is no change in the time zone.
Now if your input string was '2017-06-10 21:55:00+00' (note the +00, i.e. UTC), then doing a ->set_time_zone('Europe/Paris') on that should give you 2017-06-10 23:55:00 CEST.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Lost in DateTime !
by Discipulus (Canon) on Jun 13, 2017 at 20:58 UTC | |
by haukex (Archbishop) on Jun 13, 2017 at 21:10 UTC | |
Re^2: Lost in DateTime !
by pcouderc (Monk) on Jun 13, 2017 at 21:25 UTC | |
by haukex (Archbishop) on Jun 13, 2017 at 21:50 UTC | |
by pcouderc (Monk) on Jun 14, 2017 at 06:12 UTC | |
by huck (Prior) on Jun 14, 2017 at 07:33 UTC | |
by poj (Abbot) on Jun 14, 2017 at 17:53 UTC | |
by pcouderc (Monk) on Jun 13, 2017 at 21:43 UTC |