How to change the utc to my timezone?
I am on a project springboot and my account is on a Hobby plan, account name: Garrys Rakotoarisoa.
So the project is a springboot project with a postgresql database.
I have a table in which one of the field in a timestamp current timestamp, so when i execute my springboot project with the deployed database, i gives the exact timestamp of my country (I've set the timezone in postgresql to "Indian/Antananarivo"), but when i test the same springboot project on the deployed one with the same database, it gives another timestamp for example now in my country it's 13:19 and the currenttimestamp when i execute with the deployed project is 10:19, what should i do?
I've also tested it by setting the timezone direcly in the java project with "Indian/Antananarivo" but it's the same result.
13 Replies
Project ID:
N/A
Project ID:
N/A
what do you mean by project id?
here it is:
331af033-1a19-4fbb-bc92-42668f8e8e7e
Railway servers are configured to have time set to UTC.
so it can not be change? like just for my project?
Im not sure, but generally the approach to solve this is to localise the display of time. The timestamp is correct, it’s just you need to display the time with Indian Timezone
So if you have a dashboard etc, and you want to display the times recorded in the database, you simply parse the UTC date and then display it for Indian Timezone
this is the database, it is already set to Indian/Antananarivo, it is where i do not understand why it follows utc even if it is already set in the database
Not sure, I’d recommend removing those changes and leave it as default.
Handle Timezone as a localisation problem
i've set the timezone to default now and it shows Etc/UTC, so now what should i do?
Solution
Localise it on your frontend
okay thank youu
do you work for railway?
no