romanz / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
1.1k stars 408 forks source link

Config: electrs ignoring Timezone. Defaults to UTC #1077

Closed thnkman closed 2 months ago

thnkman commented 2 months ago

electrs runs with UTC time instead of local timezone. I have not found a setting to force timezone. Is there such a config setting?

romanz commented 2 months ago

I think it's only the logging timestamp format. If needed, I think that you can pipe the log into ts to prepend it with the local time.

thnkman commented 2 months ago

I think it's only the logging timestamp format. If needed, I think that you can pipe the log into ts to prepend it with the local time.

I have not experienced any issues with time skew, so i guess you are right. Would be nice to have it use the system configured default though. Thanks.

Kixunil commented 2 months ago

On one hand I'd agree that it'd be nice to print the time in native time zone, on the other it tends to require heavy dependencies that historically had multiple annoying issues. Hard to say if it's worth the trouble.

thnkman commented 2 months ago

On one hand I'd agree that it'd be nice to print the time in native time zone, on the other it tends to require heavy dependencies that historically had multiple annoying issues. Hard to say if it's worth the trouble.

I don't see how dependencies would have to be involved in this? But granted, i don't know much about coding in rust. Perhaps you could enlighten me on the matter?

Kixunil commented 2 months ago

This legendary video explains it the best: https://www.youtube.com/watch?v=-5wpm-gesOY

thnkman commented 2 months ago

This legendary video explains it the best: https://www.youtube.com/watch?v=-5wpm-gesOY

Haha, funny. Like a modern episode of monty python. But, could you not just parse the output of 'date' on linux based systems and call it a day? No need to over complicate things. :thinking:

Kixunil commented 2 months ago

Launching an entire command for every log record would be crazy large overhead. Also it'd make the project unix-only which is not great given it's now fully portable as far as I know.