go-dateparser icon indicating copy to clipboard operation
go-dateparser copied to clipboard

ET not parsed correctly

Open georgesfarah opened this issue 2 years ago • 1 comments

Hello!

This input 11:00am ET is giving an output of time.Date(now.Year(), now.Month(), now.Day(), 16, 0, 0, 0, time.UTC) instead of time.Date(now.Year(), now.Month(), now.Day(), 15, 0, 0, 0, time.UTC)

configs:

&dateparser.Configuration{
				DefaultTimezone:     time.UTC,
				CurrentTime:         now,
				PreferredDateSource: dateparser.Future,
			},

georgesfarah avatar Oct 11 '24 12:10 georgesfarah

Sorry for the late response.

You're right, unfortunately go-dateparser isn't smart enough to handle Daylight Saving Time, which is why ET is hardcoded as UTC-5. I’ll keep this issue open to see if there’s anything we can do about it.

RadhiFadlillah avatar Apr 29 '25 12:04 RadhiFadlillah