Sponsored Content
Full Discussion: displaying date
Top Forums Shell Programming and Scripting displaying date Post 31804 by minazk on Wednesday 13th of November 2002 03:00:45 PM
Old 11-13-2002
Thanx RTM !!!

Isn't there any OS built system utility e.g. something like "sysdate"

Also I chked the post u suggested.
Another query --- When I type

# date
Wed Nov 13 13:54:09 CST 2002
#d=`TZ=a30 date +%a' '%b' '%e' '%T' '%Z' '%Y`
#echo $d
Tue Nov 12 13:54:38 a 2002

Now, Can you pls. help me how to display the Time Zone properly.

Regds,
Minaz
minazk
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Displaying file names before a particular creation date

Hi!! I wanna display file names which are created before/after a particular date. I wud be glad if anybody can help me out in that. Thanx Dhruv (1 Reply)
Discussion started by: dhruv_saksena
1 Replies

2. UNIX for Dummies Questions & Answers

Collecting & Displaying of Last User ID and Date of Last Login

Hi, I needed to write a script to "Collect and Display the Last User ID and Date of Last Login". The requirement is: When a workstation stops reporting it could be for many reasons. If we know the last person who logged in before the workstation came down, then we can contact the last... (1 Reply)
Discussion started by: amittal
1 Replies

3. Shell Programming and Scripting

Collecting & Displaying of Last User ID and Date of Last Login

Hi, I needed to write a script to "Collect and Display the Last User ID and Date of Last Login". The requirement is: When a workstation stops reporting it could be for many reasons. If we know the last person who logged in before the workstation came down, then we can contact the last... (1 Reply)
Discussion started by: amittal
1 Replies

4. Shell Programming and Scripting

Displaying Date

Hi, Am new to unix..i want some help.. when am using ls command like ls-ltr it displaying output like this: rw-r--r-- 1 infauser dba 36 Jun 16 12:36 s1_midify -rw-r--r-- 1 infauser dba 66 Jun 16 12:42 sample_one -rw-r--r-- 1 infauser dba 77 Jun 16 13:05... (3 Replies)
Discussion started by: sujana
3 Replies

5. Shell Programming and Scripting

problem with displaying date and adding time

Hi, I have a log file with contents like 81.49.74.131 - - 81.49.74.131 - - 116.112.52.31 - - 116.112.52.31 - - I need an output like this 81.49.74.131 14/Sep/2008 Time duration: 00:06:00 116.112.52.31 15/Sep/2008 Time duration: 00:00:01 Please anyone suggest a script for this.... (1 Reply)
Discussion started by: FuncMx
1 Replies

6. Shell Programming and Scripting

Displaying every date since 2007

Hi, I need to write a script that displays every date from 01/01/2007 to 03/31/2010 in the format mm/dd/yyyy. There doesn't seem to be a "datecalc" command on my system. Any inputs? Thanks, (4 Replies)
Discussion started by: 17amrut29
4 Replies

7. Shell Programming and Scripting

Date not displaying correctly

Hi Experts, I tried to stay away from posting stuff here and asking for help. I want to print date valeu for a given variable and that is not working. #!/bin/bash START=`echo $1 | tr -d _`; FV=`echo $2` for (( c = 0 ; c < $FV ; c++ )) do # echo -n "`date --date="$START +$c day"... (12 Replies)
Discussion started by: PG3
12 Replies

8. Shell Programming and Scripting

Converting a date to friday date and finding Min/Max date

Dear all, I have 2 questions. I have a file with many rows which has date of the format YYYYMMDD. 1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too. 2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies

9. Shell Programming and Scripting

Displaying current date time of EDT in IST time

Hi Folks, My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST. IST time leads 9:30 mins to EDT. and i wrote something like below. ... (6 Replies)
Discussion started by: Showdown
6 Replies

10. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
function::ctime

FUNCTION:(3stap)					      Time utility functions						  FUNCTION:(3stap)

NAME
function::ctime - Convert seconds since epoch into human readable date/time string SYNOPSIS
ctime:string(epochsecs:long) ARGUMENTS
epochsecs Number of seconds since epoch (as returned by gettimeofday_s) DESCRIPTION
Takes an argument of seconds since the epoch as returned by gettimeofday_s. Returns a string of the form "Wed Jun 30 21:49:08 1993" The string will always be exactly 24 characters. If the time would be unreasonable far in the past (before what can be represented with a 32 bit offset in seconds from the epoch) the returned string will be "a long, long time ago...". If the time would be unreasonable far in the future the returned string will be "far far in the future..." (both these strings are also 24 characters wide). Note that the epoch (zero) corresponds to "Thu Jan 1 00:00:00 1970" The earliest full date given by ctime, corresponding to epochsecs -2147483648 is "Fri Dec 13 20:45:52 1901". The latest full date given by ctime, corresponding to epochsecs 2147483647 is "Tue Jan 19 03:14:07 2038". The abbreviations for the days of the week are 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', and 'Sat'. The abbreviations for the months are 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', and 'Dec'. Note that the real C library ctime function puts a newline (' ') character at the end of the string that this function does not. Also note that since the kernel has no concept of timezones, the returned time is always in GMT. SystemTap Tapset Reference May 2013 FUNCTION:(3stap)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy