Sure, but do you want to amend it every 6 months?Originally posted by: neilm
When you talk about daylight savings, where you have to up the hour the next half a year, I don't get it? Surely you can amend the TZ=+# to be anywhere in the 24hour period, no?
Originally posted by: kamper
Sure, but do you want to amend it every 6 months?Originally posted by: neilm
When you talk about daylight savings, where you have to up the hour the next half a year, I don't get it? Surely you can amend the TZ=+# to be anywhere in the 24hour period, no?
Can't use any of those unfortunately, or this would be wee buns.Originally posted by: jfall
this is much easier:
date -d "1 day ago"
BSD?
YESTERDAY=`expr \`date +%s\` - 86400`
date -r $YESTERDAY
edit, no gnu date![]()
Yep I can use perl, and I think that would be a better alternative.Originally posted by: Nothinman
Are you stuck using shell? Date manipulation isn't too bad in perl so that might be an option.
I'm probably just confused about this, but am I not 5 hours off UTC in the winter and 6 hours off in the summer? Isn't that the whole point of daylight savings time? I always get very confused when programming with dates.Originally posted by: neilm
That's what I mean, I don't get why you would have too.Originally posted by: kamper
Sure, but do you want to amend it every 6 months?Originally posted by: neilm
When you talk about daylight savings, where you have to up the hour the next half a year, I don't get it? Surely you can amend the TZ=+# to be anywhere in the 24hour period, no?
Why not just keep it inline with timezone like so:
TZ=EST+29 date
...and use a cronjob to trigger it during the mid day? Not sure how timezone can affect the date, can someone explain?