in reply to Check current time between range of dates and times
So to see if your proposed date is in-between those times, convert it to epoch seconds also and do a numeric comparison.
You can use the stat func to figure out if that proposed date is Monday in your local time.
I would normally do everything in GMT or UTC as it is known today.
Of course I may have missed something here...
Update: oh, another point, when writing log files, etc. I use a format like this: 2007-10-06 1647. If leading zeroes are enforced for both date and time, then a simple alpha comparison or sort will get the right answer. To add 30 minutes to 2007-10-06 1647, I convert to epoch, add 30*60, then convert back to string (all this 24 hours, 60 minutes stuff is messy).
|
|---|