The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
grep unix.com with google



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

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

Join Date: Oct 2009
Location: UK
Posts: 225
Difference in date output

HiCan anyone tell me why I am getting a difference in the date format on 2 different Solaris servers?On one I get: -
Code:
Monday,  9 November 2009 09:02:45 GMT

and the other: -
Code:
Monday November  9 09:03:05 GMT 2009

Both servers are running OS Version M-11/16/88iCan anyone tell me why one uses a "," and the other doesn't?Thanks

---------- Post updated at 10:04 AM ---------- Previous update was at 09:10 AM ----------

Sorry I should add that is the output from a straight date command with no format string
  #2 (permalink)  
Old 11-09-2009
ɹǝsn sıɹɐlosuǝdo
 

Join Date: Dec 2007
Location: Paris
Posts: 1,658
Quote:
Originally Posted by steadyonabix View Post
Both servers are running OS Version M-11/16/88i
This is a ksh version, not a Solaris one.
Quote:
Can anyone tell me why one uses a "," and the other doesn't?
Different locale configuration:

Code:
$ LC_TIME=C date -u
Mon Nov  9 11:39:25 GMT 2009
$ LC_TIME=en_US.UTF-8 date -u
Monday, November  9, 2009 11:39:29 AM GMT

  #3 (permalink)  
Old 11-09-2009
Registered User
 

Join Date: Oct 2009
Location: UK
Posts: 225
That's great thanks
  #4 (permalink)  
Old 11-09-2009
psiva_arul's Avatar
Registered User
 

Join Date: Jul 2007
Location: Bangalore, India
Posts: 97
Hi,
You have check the env file what is the type of local and server time they have set.

use the below command for check the data format in env file

env | grep -i date
  #5 (permalink)  
Old 11-10-2009
Registered User
 

Join Date: Oct 2009
Location: UK
Posts: 225
Well it seems that things are a little more mysterious than thought; echoing the value of LC_TIME gives: -


Code:
en_GB.ISO8859-1

on both servers. Grepping date from env returns nothing. Can anyone suggest any other route of investigation?
  #6 (permalink)  
Old 11-10-2009
ɹǝsn sıɹɐlosuǝdo
 

Join Date: Dec 2007
Location: Paris
Posts: 1,658
The English locale might not be properly installed (or installed at all) on one of these servers.

Compare the output of these commands on both servers:

Code:
truss -t open,stat date
apptrace -v 'setlocale,strftime' date

Sponsored Links
Reply

Bookmarks

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
difference in date dddkiran Shell Programming and Scripting 3 10-30-2009 10:54 PM
date difference muay_tb Linux 14 03-18-2008 10:08 AM
date difference piyush_movadiya Shell Programming and Scripting 2 08-11-2005 05:10 AM
date difference rajuMBT UNIX for Dummies Questions & Answers 1 08-10-2005 06:11 AM
date difference mtnbaby UNIX for Advanced & Expert Users 1 04-12-2005 11:49 AM



All times are GMT -4. The time now is 02:39 PM.


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-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0