Timezone differences...

Timezone differences...

by Peter Eliyahu Kornfeld -
Number of replies: 1

Hi,

I'm using date('H:i') to print time, but there is a timezone problem...

The server (ubuntu) is on Asia/Jerusalem + Daylight saving (IDT == UTC + 03:00), but moodle reports IST (Asia/Jerusalem, but no Daylight saving)...

The user's timezone is set to 'Server timezone'...

When I run date('I') it returns 0 (zero), so somewhere that additional hour lost...

Any idea how to overcome it?

Average of ratings: -
In reply to Peter Eliyahu Kornfeld

Re: Timezone differences...

by Peter Eliyahu Kornfeld -

I think I found a possible explanation...

For historical reasons (not my decision) date-time values are split into two columns in DB... date and time...

I'm taking the time value and it goes wrong around Daylight saving... However! If I add the date part and then do the formatting the result as expected...