I have an issue trying figure out logic for storing time in database in UTC and handling DST changes.
I have TimeStart and TimeEnd in Database which indicates business hours. Problem occurs if I save hours while it's DST and while it's not. If I save 09:00 - 17:00 on October 15th, it would result 07:00 - 15:00 (UTC) but if I would add business hours now when it's not DST it would result 08:00 - 16:00 (UTC). I thought that when converting with moment to UTC would give consistent result taking DST in consideration but I was wrong.
What's best solution to handle that on frontend/backend. Should I substract added DST time? Because using moment to handle conversion to UTC doesn't help as it gives 1 hour difference anyway (now I question everything I did so far with UTC times as problems can probably occur due this issue).
Thanks