Skip to content

Alternate way to get seconds till Xmas - #7

Open
smischny wants to merge 1 commit into
UnexpectedMaker:masterfrom
smischny:master
Open

Alternate way to get seconds till Xmas#7
smischny wants to merge 1 commit into
UnexpectedMaker:masterfrom
smischny:master

Conversation

@smischny

@smischny smischny commented Apr 6, 2023

Copy link
Copy Markdown

Hi Seon,

I don't have a wopr, but I saw in your stream that you were calling a service to get the seconds to Christmas. Here is an alternate way using local functions. I ran the code fragment on linux and on an esp32-s3 with the same results. I don't set the tm_isdst, so there is a chance of it being an hour off at times. But since you are setting the the time using a fixed offset to GMT instead of using TZ, I don't think it really matters... Anyway, just thought I would share a different way...

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.

1 participant