Sponsored Content
Full Discussion: Difference in date output
Operating Systems Solaris Difference in date output Post 302369986 by steadyonabix on Tuesday 10th of November 2009 05:34:56 AM
Old 11-10-2009
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?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

date difference

Hi...I need some help with a date script. I need to allow the user to enter the month (alpha) day (int) and year (YYYY) and count the difference in number of days since Jan 1, 1952 to the users date. I've been messing with this for about 10 hours and I think I'm just making the script worse =( ... (1 Reply)
Discussion started by: mtnbaby
1 Replies

2. UNIX for Dummies Questions & Answers

date difference

Hi Can any buddy give mi a simple program or logic or command which will get difference between two dates ex:diff between 20051008 2005908 is 24hours 12 min 2 sec regards (1 Reply)
Discussion started by: rajuMBT
1 Replies

3. Shell Programming and Scripting

date difference

if there are two date one is entered by user and another is system date than how can we finds day difference between these two date try to make it within 4 lines (2 Replies)
Discussion started by: piyush_movadiya
2 Replies

4. Linux

date difference

hi, i have 2 dates in the form: '20080315120030' and '20080310140030'. i.e. YYYYMMDDHHMMSS. i need a way of getting the difference between them using shell script. any thoughts? (14 Replies)
Discussion started by: muay_tb
14 Replies

5. Shell Programming and Scripting

difference in date

Hi All! I would like to know the time difference between two dates which are in same format... $ date -r abc Thu Oct 29 09:40:37 EDT 2009 $ date Fri Oct 30 02:07:03 EDT 2009 i would like to find the diff between these two dates in hours..please help..:) Regards, Kiran (3 Replies)
Discussion started by: dddkiran
3 Replies

6. Shell Programming and Scripting

Difference in date

Dear all, I fancy that I'm pretty competent in ksh, but I have someone on HP-UX wanting me to script up a simple interface to handle user alterations rather than giving them high privileges to run up SAM. This is all fairly straightforward, but I'm stuck on an epoch date issue. When we have... (6 Replies)
Discussion started by: rbatte1
6 Replies

7. Programming

Date difference

I tried the below code to find difference between two dates. It works fine if the day of the month is 2-digit number. But it fails when we have a single-digit day of month(ex:1-9). my code is as below. please help me soon. #!/usr/bin/perl -w use strict; use Time::Local; ... (2 Replies)
Discussion started by: anandrec
2 Replies

8. Shell Programming and Scripting

Date difference

HI All , i need a bash script to find the number of days between two dates . Format YYYY-MM-DD THanks, Neil (1 Reply)
Discussion started by: nevil
1 Replies

9. AIX

Time Difference between date and date -u

Hi Everyone, We are having an issue with date and date -u in our AIX Systems. We have checked environment variable TZ and /etc/environment and however, we could not rectify the difference. >date Thu Mar 19 22:31:40 IST 2015 >date -u Thu Mar 19 17:01:44 GMT 2015 Any clue... (5 Replies)
Discussion started by: madhav.kunapa
5 Replies

10. Shell Programming and Scripting

Difference between two date

Hi, I created a script for finding the duration of a job using the start and end time of the job. But the command doesnt calculate correct value if the duration is more than 24 hours. Any help would be really good . cat test1 --- start time 03/27/15 17:41:00 03/24/15 11:58:04 03/23/15... (3 Replies)
Discussion started by: rogerben
3 Replies
langinfo.h(3HEAD)						      Headers							 langinfo.h(3HEAD)

NAME
langinfo.h, langinfo - language information constants SYNOPSIS
#include <langinfo.h> DESCRIPTION
The <langinfo.h> header contains the constants used to identify items of langinfo data (see nl_langinfo(3C)). The type of the constant, nl_item, is defined as described in <nl_types.h>. The following constants are defined. The entries under Category indicate in which setlocale(3C) category each item is defined. Constant Category Meaning CODESET LC_CTYPE codeset name D_T_FMT LC_TIME string for formatting date and time D_FMT LC_TIME date format string T_FMT LC_TIME time format string T_FMT_AMPM LC_TIME a.m. or p.m. time format string AM_STR LC_TIME ante-meridiem affix PM_STR LC_TIME post-meridiem affix DAY_1 LC_TIME name of the first day of the week (for example, Sunday) DAY_2 LC_TIME name of the second day of the week (for example, Monday) DAY_3 LC_TIME name of the third day of the week (for example, Tuesday) DAY_4 LC_TIME name of the fourth day of the week (for example, Wednesday) DAY_5 LC_TIME name of the fifth day of the week (for example, Thursday) DAY_6 LC_TIME name of the sixth day of the week (for example, Friday) DAY_7 LC_TIME name of the seventh day of the week (for example, Saturday) ABDAY_1 LC_TIME abbreviated name of the first day of the week ABDAY_2 LC_TIME abbreviated name of the second day of the week ABDAY_3 LC_TIME abbreviated name of the third day of the week ABDAY_4 LC_TIME abbreviated name of the fourth day of the week ABDAY_5 LC_TIME abbreviated name of the fifth day of the week ABDAY_6 LC_TIME abbreviated name of the seventh day of the week ABDAY_7 LC_TIME abbreviated name of the seventh day of the week MON_1 LC_TIME name of the first month of the year MON_2 LC_TIME name of the second month MON_3 LC_TIME name of the third month MON_4 LC_TIME name of the fourth month MON_5 LC_TIME name of the fifth month MON_6 LC_TIME name of the sixth month MON_7 LC_TIME name of the seventh month MON_8 LC_TIME name of the eighth month MON_9 LC_TIME name of the ninth month MON_10 LC_TIME name of the tenth month MON_11 LC_TIME name of the eleventh month MON_12 LC_TIME name of the twelfth month ABMON_1 LC_TIME abbreviated name of the first month ABMON_2 LC_TIME abbreviated name of the second month ABMON_3 LC_TIME abbreviated name of the third month ABMON_4 LC_TIME abbreviated name of the fourth month ABMON_5 LC_TIME abbreviated name of the fifth month ABMON_6 LC_TIME abbreviated name of the sixth month ABMON_7 LC_TIME abbreviated name of the seventh month ABMON_8 LC_TIME abbreviated name of the eighth month ABMON_9 LC_TIME abbreviated name of the ninth month ABMON_10 LC_TIME abbreviated name of the tenth month ABMON_11 LC_TIME abbreviated name of the eleventh month ABMON_12 LC_TIME abbreviated name of the twelfth month ERA LC_TIME era description segments ERA_D_FMT LC_TIME era date format string ERA_D_T_FMT LC_TIME era date and time format string ERA_T_FMT LC_TIME era time format string ALT_DIGITS LC_TIME alternative symbols for digits RADIXCHAR LC_NUMERIC radix character THOUSEP LC_NUMERIC separator for thousands YESEXPR LC_MESSAGES affirmative response expression NOEXPR LC_MESSAGES negative response expression YESSTR LC_MESSAGES affirmative response for yes/no queries NOSTR LC_MESSAGES negative response ro yes/no queries CRNCYSTR LC_MONETARY local currency symbol, preceded by '-' if the symbol sould appear before the value, '+' if the symbol should appear after the value, or '.' if the symbol should replace the radix character If the locale's values for p_cs_precedes and n_cs_precedes do not match, the value of nl_langinfo(CRNCYSTR) is unspecified. The <langinfo.h> header declares the following as a function: char *nl_langinfo(nl_item); Inclusion of <langinfo.h> header may also make visible all symbols from <nl_types.h>. USAGE
Wherever possible, users are advised to use functions compatible with those in the ISO C standard to access items of langinfo data. In par- ticular, the strftime(3C) function should be used to access date and time information defined in category LC_TIME. The localeconv(3C) func- tion should be used to access information corresponding to RADIXCHAR, THOUSEP, and CRNCYSTR. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
mkmsgs(1), localeconv(3C), nl_langinfo(3C), nl_types.h(3HEAD), setlocale(3C), strftime(3C), attributes(5), standards(5) SunOS 5.10 30 Aug 2002 langinfo.h(3HEAD)
All times are GMT -4. The time now is 05:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy