Go Back   The UNIX and Linux Forums > Operating Systems > Solaris
.
google site



Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-02-2009
Registered User
 

Join Date: Mar 2009
Posts: 10
Red face date -d nightmare on Solaris

Hello there ppl,
I thought my question would qualify to be posted in this forum and in Shell scripting 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.

Last edited by pavanlimo; 04-02-2009 at 12:34 PM..
Sponsored Links
  #2 (permalink)  
Old 04-02-2009
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,189
Double posting is not allowed by the forum rules.
Thread closed.
Sponsored Links
Closed Thread

Bookmarks

Tags
solaris date

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FreeBSD nightmare!!! kenyatta BSD 6 01-20-2009 01:09 PM
Nightmare Of A CEO Linux Bot Cartoons for Geeks 0 01-08-2009 07:10 PM
is unix really such a nightmare... or is it me? mickeymouse UNIX for Dummies Questions & Answers 10 06-06-2008 04:51 AM
installing apache (nightmare for me) marinob007 UNIX for Dummies Questions & Answers 1 12-19-2007 12:03 AM
Viewcvs...a nightmare on HP-UX!!! goblin79 HP-UX 3 09-06-2005 05:28 AM



All times are GMT -4. The time now is 10:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0