2013-01-02
GNU date can display different times tha ...
GNU date can display different times than the current time, with the -d or --date parameter:-d, --date=STRING display time described by STRING, not `now'But with a bit of experimenting I found out I can use this for calculating times in other timezones too:koos@greenblatt:~$ date --date=20:00\ UTC Wed Jan 2 21:00:00 CET 2013 koos@greenblatt:~$ date --date=20:00\ US/Central date: invalid date `20:00 US/Central' koos@greenblatt:~$ date --date=20:00\ CST Thu Jan 3 03:00:00 CET 2013So you can use the short timezone name, but not the long version. Or, for day calculations:koos@greenblatt:~$ date --date="396 days" Fri Feb 28 15:36:15 CET 2014