loading words...

Jan 12, 2019 14:48:36

Adventure in Time

by @basilesamel PATRON | 260 words | 460🔥 | 511💌

Basile Samel

Current day streak: 460🔥
Total posts: 511💌
Total words: 233771 (935 pages 📄)

Over the last few days, I have been implementing the new custom timezone feature to allow anyone to publish in their own 24-hour cycle.

Before that, the countdown was based on Zurich's time where the server is located. 200WaD is now a global website with people from all around the world, so it's now making sense to add a timezone support.

Adding a timezone information to each user is not hard. What is hard is transitioning from a single timezone architecture to a truly global website without breaking anything.

Of course, I shipped fast but broke the website several times over the last few days. Sorry if you have been affected, but this is for the greater good :P

The main problem I faced is how to keep the day streaks intact after changing the timezone. To do that I added a timezone field to the posts and comments as well. There still might be some problem to readjust: if the user doesn't post before midnight the day it changed the timezone setting, the day streak will be broken. If this happens to you, please wave at me and I will fix your post's dates to keep your streak going.

One common thing people tell you when you start a product is to do things that don't scale. Well, I will never do this same mistake again: for glocal websites, internationalization should be planned from the get-go.

This post is published to ensure the timezone change has been correctly made. Let's hope I don't break anything else 🤞

With love,

From Basile Samel's collection:

  • 1

    @basilesamel Excelent! I can see all my posts with its own dates! Great job baz. Now the challenge is to keep de correct streak for every user. I know you will get it.

    Javier A. Villalba avatar Javier A. Villalba | Jan 12, 2019 19:24:12
    • 1

      @javillalba thanks man :) working on it

      Basile Samel avatar Basile Samel | Jan 13, 2019 13:59:20
  • 1

    You're doing great. Don't let up!

    Mark Armstrong avatar Mark Armstrong | Jan 12, 2019 20:48:59
    • 1

      @RealNegotiator Never!!!! Thanks for the support

      Basile Samel avatar Basile Samel | Jan 13, 2019 13:59:39
  • 1

    @basilesamel great progress!

    Luis Barragan avatar Luis Barragan | Jan 12, 2019 21:18:48
  • 1

    @basilesamel I found timezones to be one of the really hard things to be right the first time.

    Valentino Urbano avatar Valentino Urbano | Jan 12, 2019 11:32:56
    • 1

      @valentino It's my first time implementing that yes :) Internationalization is not a topic you learn in school usually. Great to learn something new every day!

      Basile Samel avatar Basile Samel | Jan 13, 2019 14:01:24
    • 1

      @basilesamel One time I had to implement a calendar compoinent that work with the farsi calendar on top of the typical Gregorian calendar that you usually use. It really kills a lot of assumptions you have about dates.

      Valentino Urbano avatar Valentino Urbano | Jan 13, 2019 16:30:23
contact: email - twitter / Terms / Privacy