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

added new timezone options and date variable assignment #156

Merged
merged 1 commit into from
May 20, 2024

Conversation

itsavaren
Copy link

I am quite bad at javascript but I noodled and tried to implement the least impactful change that would respect the user's timezone in the timestamp. I'm american but I set it as en-GB as right now the variable is in UTC. feedback is welcome, or tell me to just make a feature request if its better for someone who knows what they're doing to handle it.

this is also my first ever contribution on github so I apologize if I did something wrong.

@jonrosner
Copy link
Contributor

Hi, first of all thank you for your contribution it is highly appreciated.

Could you post examples of what it is that you are trying to achieve?

@itsavaren
Copy link
Author

The timestamp for requests comes out like this: Mon, 20 May 2024 17:12:21 GMT

I was looking for a way to set the timezone of the Yaade container but every which way I set it, the timezone on those timestamps did not change.

I looked into the code and saw that the timestamp is generated with a Date().toUTCString() which seems from my research to always generate the timestamp in UTC.

My attempted contribution generates a timestamp string that respects the environments timezone offset, so it would instead show the localtime and GMT+/-Offset, GMT-4 for my time zone, for example.

It may just be American brain but I have trouble immediately recognizing which hour the GMT timestamp relates to in my local time zone, if it's been some hours since I did the last request.

Ideally I would imagine there could be some configuration setting in the profile to choose a timezone, but my skill in js is very, very poor and I would not know where to begin.

@jonrosner
Copy link
Contributor

I see. I am fine with that change, but can you post some examples using your proposed time format? Best try out different timezones and see if all results yield the desired output.

@itsavaren
Copy link
Author

eastern jst germany ukraine screenshots from various timezones.

@jonrosner
Copy link
Contributor

LGTM. We can merge this and maybe later add a profile configuration option for this. Thanks for you help.

@jonrosner jonrosner merged commit da1936d into EsperoTech:main May 20, 2024
@jonrosner
Copy link
Contributor

Released on latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants