Result of TimeZone.getDefault()[id="Europe/Madrid",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=163,lastRule=java.util.SimpleTimeZone[id=Europe/Madrid,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
Result of DateTimeZone.getDefault(): Europe/Madrid
Key information
TimeZone.getDefault()
[id="Europe/Madrid",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=163,lastRule=java.util.SimpleTimeZone[id=Europe/Madrid,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]
DateTimeZone.getDefault()
: Europe/MadridProblem description
According to Joda's documentation in https://joda-time.sourceforge.net/faq.html#wrongoffset, it states it makes use of IANA's timezone database. We are having an issue with Portuguese timestamps before 1912, as the official offset is described as GMT–00:36:45 in that database, which is consistent with Wikipedia article and legal documents from Portugal.
tzdata
's snippet for Portugal undereurope
file:However, for that time period Joda seems to be using GMT–00:36:32, resulting in a 13 second difference to the expected.
Test case
Output of the code above: -1843514608000
Enter that in https://www.epochconverter.com/ and the result is: GMT: Wednesday, 2 August 1911 00:36:32