Unexpected behaviour after march's time change

Hey guys,

I got some unexpected timestamps after march’s time change. This is an exemple of one timestamp I got: “2000-00-01T01:00:00Z” (formatted to match ISO).

This is the code I use to generate a timestamp (in the device code):
date(time(),'u');

Also, months and days are zero-based. (Is this right?)

Did anything similar to this happened to you?

Cumps,

Months, days etc are zero-based, yes.

FWIW, I use now = date(); for digital clock I’ve been working on and that delivers the correct GMT data, including the year, which I manually update to daylight-savings time after checking for dates with a perpetual calendar algorithm. That said, I checked hours before the change and hours after, so I can’t say if this held true at the time of the change.

Well, it happened again. This was the date I got today at 00:43:02:
2000-00-01T01:00:00Z
And it is going like this until now. Is this normal?

Can you log the result of time() that is causing those dates?

Peter

@peter I found what gone wrong. The electric power in my house went down during the night and the router connected to the internet only 15 minutes after the power have been reestablished. The IMP woke up during these 15 minutos and couln’t connect to the internet, so assumed the default date - “2000-00-00 00:00:00”.

However, when the internet came back, it didn’t sync the correct date. Is this the normal behaviour?