Hello there ppl,
I thought my question would qualify to be posted in this forum and in Solaris forum.
And I swear to God.. there is no discussion on this exact topic anywhere else on the web!
So my script on BASH uses 2 commands:
1) date -d "Fri Mar 06 10:18:16 UTC 2009" +%s
This command converts the specified time into localtime(with local timezone) and then into epoch(number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970).
2) date -d "last Sunday" +%s
This command gives the time in epoch of the immediately previous Sunday.
Now I'm clueless about how to make my script compatible with Solaris.
Some pointers I found through google, not much of a help :|.
They suggested me to use
perl -e "print time;"
This prints only the current epoch time, doesn't take 'time' as input, let alone "last Sunday" as input.
So.. guys who would help solve these 2 cases will win a free lifetime holiday to mars!
Really!
No, seriously, I would appreciate any help, whatsoever.