Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional datetime field to carry timezone information #979

Closed
mltbnz opened this issue Sep 15, 2024 · 3 comments
Closed

Add additional datetime field to carry timezone information #979

mltbnz opened this issue Sep 15, 2024 · 3 comments

Comments

@mltbnz
Copy link

mltbnz commented Sep 15, 2024

Suggestion:

To make the ride feature more versatile for international events I think it would be beneficial to introduce a new field for the datetime of the event that carries information about the timezone like f.ex. an ISO8601 String.

I was trying to add this in criticalmaps-ios but it was giving me a hard time 😆

@mltbnz mltbnz changed the title Add additional time field to carry timezone information Add additional datetime field to carry timezone information Sep 15, 2024
@maltehuebner
Copy link
Contributor

maltehuebner commented Sep 25, 2024

If you call the api like https://criticalmass.in/api/ride?year=2024&month=9&size=500&extended=true, the datetime property is an UTC timestamp and via the city property, you get access to timezone. Can you work with that data?

@mltbnz
Copy link
Author

mltbnz commented Sep 26, 2024

thanks. that should be helpful 😃 🎉

In the request you referenced I see a ride in lisbon with the timezone "Europe/Berlin".
Is this something someone creating the event is setting?

Besides that I see different timezones like for a ride in London f.ex. 👍

Details

{
    "city": {
        "description": "Massa Cr\u00edtica Lisboa | every last Friday of the month | 6pm | Marqu\u00eas de Pombal\r\nLisBora | every Tuesday | 8pm | Saldanha",
        "id": 748,
        "latitude": 38.725977097001,
        "longitude": -9.1505663398857,
        "main_slug": {
            "id": 10356,
            "slug": "lisboa"
        },
        "name": "Lisboa",
        "slugs": [
            {
                "id": 10356,
                "slug": "lisboa"
            }
        ],
        "timezone": "Europe/Berlin",
        "title": "Lisboa"
    },
    "cycle": {
        "day_of_week": 2,
        "latitude": 38.733125369076,
        "location": "Monumento ao Duque da Saldenha",
        "longitude": -9.144852811005,
        "week_of_month": 4
    },
    "date_time": 1727204400,
    "enabled": true,
    "id": 20211,
    "latitude": 38.733125369076,
    "location": "Monumento ao Duque da Saldenha",
    "longitude": -9.144852811005,
    "social_network_profiles": [],
    "title": "Lisboa 24.09.2024"
}

@mltbnz
Copy link
Author

mltbnz commented Sep 30, 2024

Closing this since using the extended response seems to solve the issue

For reference

criticalmaps/criticalmaps-ios#511

@mltbnz mltbnz closed this as completed Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants