New DateTime(#) not starting from zero?

If 8 hours = 28800 seconds (8 * 60 * 60) and DateTime.SecondsFrom1970 starts at 1970-01-01 00:00:00, then why does tempDate become 9 am (1970-01-01 09:00:00) and not 8 am (1970-01-01 08:00:00)?

tempDate = New DateTime(28800)

I have tried it adding TimeZone.Current and it make no difference.

Tried the gmt base?

tempDate = New DateTime(28800, New TimeZone(0))

i think a nil timezone is the same as the current system timezone.

Yes, that solves it, but I am still a little stumped why the former doesn’t work. It must be non daylight saving time, so my code would have worked in summer then caught me out in winter.

What is your system timezone ?

UK, so that would explain the 1 hour difference.

Even with this explanation, my head is finding it hard to grasp that 28,800 seconds after midnight can result in entirely different times in different time zones.

The secondsFrom1970 is always gmt
The timezone property says how the other properties will be shown.

So the hour property could be for example 1 or more higher in different timezones.

That’s why you should construct a new datetime with the timezone you want the user to see.