Activity for Sunwait

  • noiambujo noiambujo posted a comment on discussion General Discussion

    UPDATE - I added the following code to the getMidnightUTC() function, like the other DST patch, at line 544 of my local copy struct tm localTm; myLocalTime (&pRun->nowTimet, &localTm); int isdst = localTm.tm_isdst; tmpTm.tm_isdst = isdst; With the code "borrowed" from the previous isdst fix, it apears to now properly print DAY and NIGHT transitions at the proper times on the days before, on and after the DST timezone change. Hopefully my assumptions are correct - sunwait appears to work properly...

  • noiambujo noiambujo posted a comment on discussion General Discussion

    Hello - first, thanks for creating sunwait! I use it for detecting if the current time is DAY or NIGHT, and open or close my chicken coop door accordingly (+/- an offset). I am using it in an area that uses DST. Upon leaving DST this morning (from EDT to EST) the DAY/NIGHT (poll) feature broke for today (11/01/2020). Sunrise was 06:25 (as verified by sunwait list offset 0), but the poll feature returned DAY at 05:25 instead of at 06:25. I've reproduced it by setting my system's date to 05:20 11/01/2020...

  • Daniel Risacher Daniel Risacher posted a comment on discussion General Discussion

    I wrote sunwait in 2000, and abandoned it in 2004. Someone asked me about it recently and I promised I'd move it to GitHub to make the code more collaboration-friendly. So I stood up a repo on GitHub at https://github.com/risacher/sunwait I also pulled in the bugfix suggested by Phos Quartz in December 2018 and I implemented the 'solarnoon' feature that someone asked for in 2017. (That's in a branch for now, since I want to test it a bit more: https://github.com/risacher/sunwait/tree/solarnoon )

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    Hello. I found a bug in the code, and I have a 4-line fix. Surface Symptom Two days out of every year in my time zone, on the days when DST switches, sunwait's output is wrong by one hour. The following day it's back to normal. Closer Study The code calculates 2 time stamps, "Now" and "Target;" the latter may be midnight UTC the same day as "Now," or that of a user-specified day. However it fails to account for the possibility that the interval between "Now" and "Target" might span a change in DST,...

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    Hello. I found a bug in the code, and I have a 4-line fix. Surface Symptom Two days out of every year in my time zone, on the days when DST switches, sunwait's output is wrong by one hour. The following day it's back to normal. Closer Study The code calculates 2 time stamps, "Now" and "Target;" the latter may be midnight UTC the same day as "Now," or that of a user-specified day. However it fails to account for the possibility that the interval between "Now" and "Target" might span a change in DST,...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    I know why this doesn't work, but I can't follow the intended logic. I can't find any details on how strftime() obtains the format conversion for %z. Even the author of Sunwait calls this "secret magic" (line 463). The man page says it uses the environment variables TC and LC_TIME, but getenv() returns NULL for these names both before and after the call to mktime(). The reason it fails here is because a struct tm is being used to represent "UTC." This is not entirely possible; the docs show this...

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    Since I was looking at this problem just as DST was changing, I've just had the rare opportunity to catch another bug associated with this boundary condition: Debug: All output to use local timezone (nogmt). Debug: Now utcTm: Sun Nov 4 01:56:14 2018 GMT Debug: Now localTm: Sat Nov 3 21:56:14 2018 EDT Debug: Now UTC bias (add to GMT to get EDT) hours: -5.000000 I have checked an double-checked both my local and UTC time. I know my UTC offset right now is -4. Count on your fingers and see the given...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    Since I was looking at this problem just as DST was changing, I've just had the rare opportunity to catch another bug associated with this boundary condition: Debug: All output to use local timezone (nogmt). Debug: Now utcTm: Sun Nov 4 01:56:14 2018 GMT Debug: Now localTm: Sat Nov 3 21:56:14 2018 EDT Debug: Now UTC bias (add to GMT to get EDT) hours: -5.000000 I have checked an double-checked both my local and UTC time. I know my UTC offset right now is -4. Count on your fingers and see the given...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    (All of the above is in reference to version 0.8, btw, not version 0.4 as represented in the SourceForge Git repo accessible from the "Code" tab above.)

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    Hello. I found a bug in the code, and I have a single-line fix. Surface Symptom Two days out of every year in my time zone, on the days when DST switches, sunwait's output is wrong by one hour. The following day it's back to normal. Closer Study The code calculates 2 time stamps, "Now" and "Target;" the latter may be midnight UTC the same day as "Now," or that of a user-specified day. However it fails to account for the possibility that the interval between "Now" and "Target" might span a change...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    Hello. I found a bug in the code, and I have a single-line fix. Surface Symptom Two days out of every year in my time zone, on the days when DST switches, sunwait's output is wrong by one hour. The following day it's back to normal. Closer Study The code calculates 2 time stamps, "Now" and "Target;" the latter may be midnight UTC the same day as "Now," or that of a user-specified day. However it fails to account for the possibility that the interval between "Now" and "Target" might span a change...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    At first I thought it might be because you omit the 'rise/set' option, but actually mine seems not to require that. Maybe it has to do with your invocation method. (I don't know anything about Windows.)

  • mikeh7878 mikeh7878 posted a comment on discussion General Discussion

    Any ideas why it's not waiting? Please see attached screenshot.

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    sunriset.cpp 95c95 < if (abs(cost) < 1.0) --- > if (fabs(cost) < 1.0) makefile 12a13 > OBJECTS_ONLY=sunwait.o sunriset.o print.o 18c19 < $(C) $(OBJECTS) -o $@ $(LDFLAGS) --- > $(C) $(OBJECTS_ONLY) -o $@ $(LDFLAGS) sunwait.cpp 37c37 < #if defined __linux__ --- > #if defined __linux__ || defined __APPLE__ 398c398 < #if defined __linux__ --- > #if defined __linux__ || defined __APPLE__ 418c418 < #if defined __linux__ --- > #if defined __linux__ || defined __APPLE__ 480c480 < #if defined __linux__ ---...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    sunriset.cpp 95c95 < if (abs(cost) < 1.0) --- > if (fabs(cost) < 1.0) makefile 12a13 > OBJECTS_ONLY=sunwait.o sunriset.o print.o 18c19 < $(C) $(OBJECTS) -o $@ $(LDFLAGS) --- > $(C) $(OBJECTS_ONLY) -o $@ $(LDFLAGS) sunwait.cpp 37c37 < #if defined __linux__ --- > #if defined __linux__ || __APPLE__ 398c398 < #if defined __linux__ --- > #if defined __linux__ || __APPLE__ 418c418 < #if defined __linux__ --- > #if defined __linux__ || __APPLE__ 480c480 < #if defined __linux__ --- > #if defined __linux__...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    Turns out MacPorts knew it was broken but didn't know why. I linked them to this discussion.

  • Phos Quartz Phos Quartz modified a comment on discussion General Discussion

    Hey guys, thank you for this project! It's great! I own a desktop with macOS 10.12, and have installed Sunwait through MacPorts. This was evidently outside your direct intention as the developers, because some of the code is wrapped in #ifdefs that neglect OSX, and it therefore doesn't execute. Because with most inputs this causes no crash, the MacPorts maintainers seem not to have noticed. (I will link them to this discussion too.) Instead all the outputs are nonsense. I got it to compile with only...

  • Phos Quartz Phos Quartz posted a comment on discussion General Discussion

    Hey guys, thank you for this project! It's great! I own a desktop with macOS 10.12, and have installed Sunwait through MacPorts. This was evidently outside your direct intention as the developers, because some of the code is wrapped in #ifdefs that neglect OSX, and it therefore doesn't execute. Because with most inputs this causes no crash, the MacPorts maintainers seem not to have noticed. (I will link them to this discussion too.) Instead all the outputs are nonsense. I got it to compile with only...

  • Avro Avro posted a comment on discussion General Discussion

    Been using Sunwait to control the collection and uploading of images from a weather camera with great success! A fantastic little program! Is it possible to have to software 'wait' until the sun is directly overhead locally? I tried waiting for a custom angle, and chose 90º, however the program simply ran immediately. According to the timeanddate.com the sun's angle at noon is only about 62º. This changes daily of course. I know Sunwait can report the time of solar noon if you run a 'report', but...

  • Rich James Rich James posted a comment on discussion General Discussion

    Thanks for this program/source with added features. Successfully compiled for Asus...

  • Notal Tonsense Notal Tonsense posted a comment on discussion General Discussion

    Looking at the source code I figured that the year, month, and day of the month parameters...

  • Doug Curtis Doug Curtis posted a comment on discussion General Discussion

    The help summary shows that a target date can be specified but I can't get it to...

  • S Morgan S Morgan modified a comment on discussion General Discussion

    I am actually in the states (Austin Texas) so not only do we have DST, it is all...

  • S Morgan S Morgan posted a comment on discussion General Discussion

    I am actually in the states (Austin Texas) so not only do we have DST, it is all...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I was thinking about S Morgan's trouble in Manilla. Sunwait has had bugs with time...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    International time makes my head spin. Ran: sunwait report 30.19N -97.80W gmt. The...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    The first picture of the sunwait project on sourceforge.net shows the script placed...

  • S Morgan S Morgan posted a comment on discussion General Discussion

    Compiled 0.8 on Ubuntu Run the following: zm:~$ date Thu Nov 12 16:07:30 CST 2015...

  • John Stephenson John Stephenson posted a comment on discussion General Discussion

    This applicationn is exactly what I have been looking for. However, I cannot find...

  • CaptainIffy CaptainIffy created ticket #1

    Broken negative angle/hour reduction: revolution()

  • Sunwait Sunwait released /README.txt

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I've just released version 0.8. I've been asked to release the Linux code as a tar-ball....

  • Sunwait Sunwait released /cron

  • Sunwait Sunwait released /sunwait.exe

  • Sunwait Sunwait released /sunwait0-7.tar

  • Sunwait Sunwait released /sunwait0-8.tar

  • Sunwait Sunwait released /sunwait0-8.exe

  • Sunwait Sunwait released /sunwait0-7.exe

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    It's nearly ready. I've resolved the dateline and high latitude problems. I've also...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I'm working on the next release. The code has problems near the dateline (noon at...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    Well, it's done. Hopefully both the Linux and Windows functionality of the same code...

  • Sunwait Sunwait released /sunwait.h

  • Sunwait Sunwait released /makefile

  • Sunwait Sunwait released /print.cpp

  • Sunwait Sunwait released /print.h

  • Sunwait Sunwait released /sunwait.cpp

  • Sunwait Sunwait released /sunwait

  • Sunwait Sunwait released /sunriset.cpp

  • Sunwait Sunwait released /sunriset.h

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    The road to hell is paved with good intentions. Visual Studio doesn't support the...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I'm finishing up version 0.7. Hopefully the timezone and daylight savings troubles...

  • Sunwait Sunwait released /sunwait.h

  • Sunwait Sunwait released /print.h

  • Sunwait Sunwait released /sunwait.cpp

  • Sunwait Sunwait released /makefile

  • Sunwait Sunwait released /sunriset.h

  • Sunwait Sunwait released /print.cpp

  • Sunwait Sunwait released /sunriset.cpp

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    Still working on a fix. I now have a much better understanding of the C/timezone...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    There's a problem with Sunwait's understanding of time. I had assumed that the C...

  • Sunwait Sunwait released /cron

  • Sunwait Sunwait released /smj.sh

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I've not got XP anymore. I'll have to have a think about it. This might help: ht...

  • Z Z posted a comment on discussion General Discussion

    Hi! Thx for sunwait, but I have a problem. It works under Win7 x64, but under XP...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I've just added the Windows program "sunwait.exe" for your convenience. Unix users...

  • Sunwait for Windows Sunwait for Windows released /sunwait.exe

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I tried using a fixed time duration to switch on lights just before sunset; but,...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I've just released version 0.6. It should handle local time now. The sleep problem...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    I've just released version 0.6. It should handle local time now. The sleep problem...

  • CaptainIffy CaptainIffy posted a comment on discussion General Discussion

    Thanks Robert. I didn't see your post until now. My port to Linux was very flakey,...

  • Sunwait for Windows Sunwait for Windows released /sunriset.cpp

  • Sunwait for Windows Sunwait for Windows released /print.h

  • Sunwait for Windows Sunwait for Windows released /print.cpp

  • Sunwait for Windows Sunwait for Windows released /makefile

  • Sunwait for Windows Sunwait for Windows released /sunwait.cpp

  • Sunwait for Windows Sunwait for Windows released /sunriset.h

  • Robert Tidey Robert Tidey posted a comment on discussion General Discussion

    If using this code for a linux build by changing the comments then the sleep is in...

1
MongoDB Logo MongoDB