R
RailwayFury_21

time zone

How to configure the time zone for my project so that it is UTC-5, which is from Lima, or I have also tried America/Lima this way, but it doesn't work for me because by default it outputs UTC+0, in my location it outputs normally, the datalle is when I place it in the Railway, I have tried to place the TZ as a variable in my project in railway but it doesn't work either.
Solution:
you should always keep the server timezone in UTC as that is standard, then simply convert to the desired timezone for display purposes
No description
No description
No description
P
Percy32d ago
Project ID: N/A
F
Fury_2132d ago
N/A
Solution
B
Brody32d ago
you should always keep the server timezone in UTC as that is standard, then simply convert to the desired timezone for display purposes
F
Fury_2132d ago
For example, I have a column that is auto_now_add=True and that's exactly what it comes out with UTC+0, but I have another one that is a normal date default=timezone.now and that normal one does come out with my time zone
B
Brody32d ago
as mentioned, you want to keep all time stamps in UTC, as that is standard
F
Fury_2132d ago
I'm going to deploy again with the fixes
F
Fury_2132d ago
nothing comes out the same with UTC+0
No description
B
Brody32d ago
what do you mean "comes out"
F
Fury_2132d ago
It's the same as before
B
Brody32d ago
I'm not seeing any issues with that screenshot, perhaps I'm missing some context
F
Fury_2132d ago
What is in red is my current time and what is in green is the response when consuming my api, in theory my same current date should appear, but tomorrow's date appears.
No description
B
Brody32d ago
yes, the date stamp on the left is localized, the date on the right is utc, there are no issues here
F
Fury_2132d ago
If there is a problem, because when you register today's date, tomorrow's date appears.
B
Brody32d ago
you simply look at the timestamp on the left
F
Fury_2132d ago
I don't think you let me explain. I have a reserve table and when I consume, for example, today the 14th at 11 p.m., it registers it with the date of tomorrow the 15th at 4 a.m. because there is a difference of 5 hours.
B
Brody32d ago
saw that not sure why you where showing me console logs, in that case please read over my first message and it does cover the correct solution.
F
Fury_2132d ago
That's why I did what you told me about UTC, but nothing.
B
Brody32d ago
please read the second half of the message
F
Fury_2132d ago
to convert it to the desired time zone for display purposes?
B
Brody32d ago
yes, you store all your timestamps in UTC and convert the timestamp to the users local time for display purposes
F
Fury_2132d ago
goes
B
Brody32d ago
please stop with the ping replies, we are the only two people in this thread
Want results from more Discord servers?
Add your server
More Posts
subscription didn't charged automaticallyHi, I have my card saved on railway and it didn't charged me automatically, should i wait for this oIs it possible to run docker compose as a railway serviceI have a fairly straightforward app running via docker compose. Is there way to get this to run on aUnable to transfer project ownership from hobby plan to pro planI am on a hobby plan currently and trying to transfer ownership of one of my projects to my partner ImportError: libstdc++.so.6: cannot open shared object file: No such file or directorySomething is being messed up in the C libraries and I don't know how to fix it. ## Context: My DeveProject Transfer not possible even though on Hobby planOur developer created a personal / free account (with his GitHub account) and moved our database to Rails and Vite project start command?Hi all, I'm trying to get a Rails/Vite/Svelte mono repo app to start in Railway I've tried `bin/railrequests dependency warningI am running the project on Railway. **Warning:** `venv/lib/python3.11/site-packages/requests/__inMy Prod is down: MySQL volume ran out of disk spaceHi Railway team, I'm in full mode crisis. My MySQL volume is full, and it doesn't let me increase tbrowse files on a volume?is it possible to browse the files stored on a volume? (im thinking some kind of web interface?)DNS ConfigureWhere i need to past the vakue which railway give me?how change builder projecthow change builder project from nixpacks to heroku buildpackshow on earth do i get data out of a volumeTheres really no way?debit card keeps decliningI added a Discover debit card as payment options while getting the Hobby plan. The billing exceeded Railway Template ComposerHey everyone. I wanted to make a template for one of my projects through https://railway.app/button,Railway redeploying continously after project being deletedI have been receiving emails from railway about failed deployments from a project that I have alreaddeployments issuesAny time I try to deploy it keeps showing me this please I need help with thisDjango Allowed Hosts Error "Invalid HTTP_HOST header: '0.0.0.0:8000'"I am getting this error sent to my admin email from the application I deployed on railway.app ```InRedis notificationHow can I, or is it possible to, configure notify-keyspace-events ?Web app keeps on reloadingThe web application is very slow and on the observability I found errors, I don't know what they areSocket IOHello everyone I am facing an issue connecting my app with a railway server through sockets I'd appr