<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 2018-09-17 12:01 AM, Tobias Dammers wrote:<br>
<blockquote type="cite"
cite="mid:20180917060129.jbanodarfpurpdce@nibbler">… you can
convert unix timestamps to some "local time without timezone info"
data structure (e.g. LocalTime); whether you assume UTC or any
timezone becomes relevant when you want to convert that data
structure into a data structure that does contain timezone info
explicitly (like ZonedTime) or implicitly (like UTCTime).<br>
</blockquote>
<br>
I don't think this is possible. If you want to measure seconds since
1970-01-01 00:00:00 local time (which may actually be 1969 in UTC)
you have to know the timezone at the start (ie in 1970) and at the
end (ie after the seconds have elapsed). That requires knowing
whether DST applies at either end, and whether the location was
rezoned during the intervening time. This requires IO and the
conversion from seconds is no longer a pure operation.<br>
<br>
IHMO, the only sane way to interpret seconds-since-the-epoch is
using UTC.<br>
</body>
</html>