Timezone converter app - for the fun of it

Timezone converter app - for the fun of it
0.0 0

#1

Hi,

I was messing around with something. I was struck by the difficulty of trying arrange a call with someone in Europe - trying to keep track of what times match up with what times. So I thought of building an app.

It is a simple app built with React/Redux on the front end and Node/Express on the backend. It uses Google’s suite of map/geo APIs. All that his handled on the backend so I don’t have to expose my Google key.

Things that could be improved:

  • It should have a “find me” button. It would be easy to put in and would do it now if it wasn’t so late. Maybe tomorrow.
  • It handles DST, but will give incorrect times if the DST changes during that 24 hours. This would get messy to do, because the API only tells me if somewhere is in DST right now. It doesn’t tell me when they change - it’s different in different countries and can change. Do I want to call the API 24x2 times? Plus 24 more for each search? I suppose I could build the data structure like I am and do an additional call on the last hour to see if it matches expectations. If not, we do a binary search to find the problem.
  • It just occurs to me that not all timezones are off by exactly an hour. I should probably handle that.
  • I need to change the favicon. (I always forget.)
  • As with all my apps, I could make it prettier.

OK. Critiques? Suggestions? Job offers?

The app is here and the code is here.


#2

Oh that can of worms. :smiley: Luckily the second precision timezones are long gone.

Nepal, as one of the fractions, works fine.
The fact that DST is looked up by coordinates is also good, as it is not bound to countries (eg. Australia).
If I enter “tuvalu” as the location, the autocomplete floats with a large gap, not immediately under the input.
The borders in the bottom table are inconsistent, which is visible especially in the last row.


#3

As time-wrapper starts always with text i would text-align: left; instead of center.
Even more I would try to divide the span in two cols one for the day text-aligned left and one for the hour text-aligned right.


#4

OK, that’s weird - I’ll have to look into that. Out of curiosity, what make you try that string? That’s the only thing I’ve seen that on and it’s such an unexpected string.


#5

I guess it does it with other strings too, like “kirkland washington”, strings that are so specific that they return fewer than 5 responses (the default for that API). Hmmm.


#6

I couldn’t remember Kiribati immediately (+12-14), so I tried another Polinesian country …