I am trying to write up a Time Zone Converter for my website but running into an issue where changing the Time Zone from a drop-down does not accurately re-calculate the converted time.
I am trying to have it so if you change the time or time-zone for section A, then it will automatically adjust section B. And vice-versa. I believe I have the Date-Time portion working correctly, but changing timezones doesn't appear to be adjusting as expected.
Could anyone please take a look and provide any suggestions?
You can view the source for this on
My Codeberg~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update: Updated a bit and now I have the Time / Time Zone conversion working when changing the Time on Section A, or the TimeZone on Section B. These use the 'a_to_b' functionality. When I try to convert the Time from B to A, B's current time is posted into A instead of converted to A's Timezone. Similarly, Changing A's timezone will update A's time but based off of its original value instead of B's. Hopefully that makes sense!
It seems that I cannot update the Time/Date in Section A based on changes done to section B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update 2: Uploaded to my site:
https://pieceofthepie.neocities.org/tools/timezone_converter in a semi-working state. I am using the Input type of 'datetime' instead of 'datetime-local' as I believe this was the reason I could not adjust the TimeZone (even when doing the conversion method recommended online).