Git Product home page Git Product logo

Comments (12)

mltbnz avatar mltbnz commented on September 6, 2024 1

😄
There is an api from Apple that could be used but I think the device timezone should be ok

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

It's great to hear you are promoting the feature 👍

When I built the feature I honestly didn't take into account international usage. I quickly had to check how the backend is returning the dateTime and it doesn't provide a timezone unfortunately.

image

Bit since I know its will always be in Berlin timezone I think it should be fairly easy to convert it.

I would imagine basing it on the coordinates is tricky

from criticalmaps-ios.

ahokcool avatar ahokcool commented on September 6, 2024

Thx :)

and fair enough - I guessed that time zones are not supported in criticalmass.in ;)

I also encountered a problem when creating the city of Lisbon. So at the moment it is listed in the region "Niedersachsen" :D But I don't think it matters too much.

Untitled

Regarding the time zones:
Maybe there is some easy, free API that converts coordinates into a time zone:
I did a quick search and found this one:
geoapify

Seems to be free up to 3.000 requests per day:
https://www.geoapify.com/pricing

Anyhow, thx for giving it a try :)

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

@ahokcool
Could you look at this please and check if my testing setup really works 😆
So basically the UNIX timestamp 1711731600 should be displayed correctly for the GMT timezone
#500

from criticalmaps-ios.

ahokcool avatar ahokcool commented on September 6, 2024

I'm always confused with the direction of time shifting :D

That's how I see it now:

image

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

yes. that should be ok, right?
I am also confused by it 😆

Screenshot 2024-03-01 at 14 40 45

from criticalmaps-ios.

ahokcool avatar ahokcool commented on September 6, 2024

Complicated :D No I don't think it's right yet :D

So on criticalmass.in I set the time to lets say 8pm.
I mean 8pm (Lisbon Time) but criticalmass.in thinks 8pm (Berlin Time)

image

So in the app, it actually doen't need to change it should also display 8pm (not 7pm) 🤔
So maybe for the displaying text nothing needs to be changed at all.

The only thing I realized is, that the event wasn't visible anymore up from like 1 hour before it started. I guess because of the one hour difference the app assumed that the event was already in the past...
But not sure if I got that right now :D

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

So wouldn't the simplest solution be to set the event to german time like 21 Uhr which would be the correct starting point in local lisbon time, right? Since 20 uhr lisbon time is 21 uhr german time.

I need to wrap my head around the api I guess to check if they really send a utc timestamp. Will take a look next week

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

I updated the PR.

Think it needs to be fixed to german timezone to make it work.

But I see others adding international events taking the timezone difference into account.

Not sure yet about what's best

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

Fyi. I merge the pr with fixed Germany Timezone since I think it's not obvious on the criticalmass.in website that times are implicitly in german timezone.

Will roll it out next month 🤞

from criticalmaps-ios.

ahokcool avatar ahokcool commented on September 6, 2024

Sorry for the late response I was quite busy...

I am not quite sure if I got it correctly but I guess you will make it work ;)

For me, the ideal situation would be to enter the event on criticalmass.in in the local time zone. So critical maps should display the upcoming event, correct since it just takes the date from the website. (I guess this is the state it used to be before I open this issue)
The only thing that should be changed is that the app should take into account that the time period in which the upcoming event will be promoted/displayed in the app should be according to the local aka device time zone.

Example:

  • Event in Lisbon at 8 PM Lisbon time.
  • I set up the event on critical mass.in for 8 PM (which will result in 8 PM Berlin time what I as a user don't really notice)
  • Critical maps will display the upcoming event for 8 PM (without mentioning a time zone)
  • The event should be visible in the app, maybe even up until half an hour after the official start: 8:30 PM Lisbon time (which should be 9:30 Berlin time)

from criticalmaps-ios.

mltbnz avatar mltbnz commented on September 6, 2024

Thanks.
So with the change I made it should be displaying the time you entered at criticalmass.in regardless of the timezone you are in.

I need to check if the logic to display an event needs some adjusting as well

from criticalmaps-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.