PDA

View Full Version : Time



schillie
July 1st, 2009, 12:35 PM
High,
i wanna program the displayed time of the system clock.
The clock should show the time (h:sec) after or before sunrice (sunset).
There is sunrisetime+x=original time (Time elapsed since sunrise) and original time+x=sunsettime (until sunset still passing time) and sunsettime+x=original time (Time elapsed since sunset) and original time+x=sunrisetime (until sunrise still passing time).
Could anyone tell, what i have to do? Should i write a script? Or should i use my small Turbo-Pascal knowledge?
André

benj1
July 1st, 2009, 03:32 PM
im guessing the way youre asking "what do i have to do" that this is home work.

i dont think anyone here is willing to do your home work for you, but if you ask a specific question that couldn't be answered with a quick google search, im sure you would get an answer to your question.

i have absolutely no knowledge of pascal, but i would be very surprised it it didn't have some kind of time module, which you can use to get the time. Regarding sunrise and sunset you would probably have write your own text file with times, although you could probably find something on the internet, if you think its worth it.

you could also write a script yes, if you mean bash, read the 'date' info and man pages, but again there isn't an easy way to get sunrise/sunset times

wojox
July 1st, 2009, 03:39 PM
Use php and use the sunrise - sunset functions.
I'm still having trouble understanding your logic?

schillie
July 2nd, 2009, 10:31 AM
So, i will try to program my first script. ;)