Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sttime(3) [osf1 man page]

sttime(3)						    ShapeTools Toolkit Library							 sttime(3)

NAME
stMktime, stWriteTime - date and time handling SYNOPSIS
#include <config.h> #include <sttk.h.h> time_tstMktime (char *string); char*stWriteTime (time_t date); DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is a list of all valid formats, optional parts in brackets. [Tue] Jan 5[,] [19]93 This includes the standard asctime(3) format. Jan 5 With no year given, the year defaults to the current year. [19]93/01/05 This notation requires month and day represented by exactly two digits. 5.1.[19]93 This is the usual German notation. 5.1. German notation referencing the current year. A certain time, given together with the date must always have the following form. hours:minutes[:seconds] Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below 10 may be written as one digit numbers. The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white- space may be given between a field of the time value and the separating colon. The time is always considered to be local time. stWriteTime generates a time string similar to asctime(3) from its date argument. SEE ALSO
asctime(3) BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure. sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)

Check Out this Related Man Page

sttime(3)                                                   ShapeTools Toolkit Library                                                   sttime(3)

NAME
stMktime, stWriteTime - date and time handling SYNOPSIS
#include <config.h> #include <sttk.h.h> time_tstMktime (char *string); char*stWriteTime (time_t date); DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is a list of all valid formats, optional parts in brackets. [Tue] Jan 5[,] [19]93 This includes the standard asctime(3) format. Jan 5 With no year given, the year defaults to the current year. [19]93/01/05 This notation requires month and day represented by exactly two digits. 5.1.[19]93 This is the usual German notation. 5.1. German notation referencing the current year. A certain time, given together with the date must always have the following form. hours:minutes[:seconds] Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below 10 may be written as one digit numbers. The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white- space may be given between a field of the time value and the separating colon. The time is always considered to be local time. stWriteTime generates a time string similar to asctime(3) from its date argument. SEE ALSO
asctime(3) BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure. sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to execute a while loop for 20 minutes?

I want to execute a while loop (or any other loop) for 20 minutes. I have extracted the minutes and seconds from the current system date by using the command y = `date +%M%S` How to proceed ?? (6 Replies)
Discussion started by: subhotech
6 Replies

2. UNIX for Advanced & Expert Users

Read text file from a specified string to the end

Hi All, I like to read the log file from specific time to end of the file. eg: message date and time message 1 date and time1 message 2 EOF I want to read all the text (Messages) after date and time to end of the file. Please let me know the UNIX command to perform this?. Thanks,... (9 Replies)
Discussion started by: bsrajirs
9 Replies

3. Shell Programming and Scripting

add 2hours in current time

hi i want to add 2hr ( or any hours inputed by user) to current time and print it. can any one help me with script. eg suppose current date is "10-sep-2008 23:10:00" and if i added 4hrs to it output should be "11-sep-2008 03:10:00" i want to run shell script in "ksh" (8 Replies)
Discussion started by: anup13
8 Replies

4. Shell Programming and Scripting

How do you convert scientific time to standard

Hi All, I'm new to this forum, and appreciate any assistance with my issue. I have a shell script that logs into an oracle DB and runs a sqlplus query. Everything works great except for the time I get. I'm new to shell so bare with me. What would be the code and where do I place it? My... (18 Replies)
Discussion started by: cg_dude
18 Replies

5. Shell Programming and Scripting

subtract minutes from time

i have the time 20100421043335 in format (date +%Y%m%d%H%M%S),and i want to be able to get the previous time 2 minutes ago,which is 20100421043135 (9 Replies)
Discussion started by: tomjones
9 Replies

6. Shell Programming and Scripting

How to get date-3 value in sh.

Hi, I am doing a shell script and I need the date (tdate-3) value, example if my tdate is, tdate=`date +%Y%m%d_%I%M%p` (variable 1 could be from few hours old, not present date at the time I need prevdate value) prevdate === ? (should variable should be tdate-3) Please help. ... (6 Replies)
Discussion started by: script2010
6 Replies

7. Shell Programming and Scripting

Converting date string to different formats

Sucks to be a noob :o See my last post for solution I have 3 different log formats and the filenames contain a date. I am trying to write a script to grep these files between two date ranges. I am now stuck at the date conversion bit. I let the user entered a date string in the format... (6 Replies)
Discussion started by: GermanJulian
6 Replies

8. Shell Programming and Scripting

trim 0 ahead of a time,pls help~

Hi, I am trying to write a ksh to compare the time in a date date Thu Jul 1 09:01:24 PDT 2010 when I try to get hour date | awk '{print $4}' | cut -f1 -d: 08 how I can trim the 0 ahead of 08 to make it 8? please help~ (7 Replies)
Discussion started by: netbanker
7 Replies

9. Solaris

How to show time minus 60 minutes?

In Redhat it is easy.... date --date="60 minutes ago" How do you do this in Solaris? I got creative and got the epoch time but had problems.. EPOCHTIME=`truss date 2>&1 | grep "time()" | awk '{print $3 - 900}'` echo $EPOCHTIME TIME=`perl -e 'print scalar(localtime("$EPOCHTIME")),... (5 Replies)
Discussion started by: s ladd
5 Replies

10. Shell Programming and Scripting

Need to check a file from a certain position onwards

Scripting Guru's, I need your help, can you tell me how i can check a file from a certain point onwards via a ksh script. Currerntly i am checking the whole file and can't script it so it checks from 17.01.2012 20:00:00 onwards please.. Any help will be greatly appericated. See file... (10 Replies)
Discussion started by: Junes
10 Replies

11. Shell Programming and Scripting

Last login with year

'last' command gives me date and time the user has logged in last. But how to get the date with year? (8 Replies)
Discussion started by: Soham
8 Replies

12. Shell Programming and Scripting

Adding hours to current date

Hi, any idea how to add hours to current date in unix. thanks in advance (9 Replies)
Discussion started by: Abhijeet_Atti
9 Replies

13. UNIX for Dummies Questions & Answers

Adding hours and minutes to current date (Only to date not to time)

Hi, I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help. Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies

14. UNIX for Dummies Questions & Answers

Minus 5 minutes

Hi, I need to subtract 5 minutes from the date. Example $date +"%Y-%m-%d-%H.%M.%S" displays 2014-06-26-06.06.38 I want to show it as 2014-06-26-06.01.38 (5 mins are subtracted from date) Any help would be appreciated. I am currently on AIX version 6.1 -Vrushank (10 Replies)
Discussion started by: vrupatel
10 Replies

15. UNIX for Dummies Questions & Answers

Ls -l question

Hi, When doing ls -l, is it right to assume that all files with the date and time on it are files that are created/modified on the current year? Is there any way to display the creation/modified date of a file that are not created/modified in the current year? (4 Replies)
Discussion started by: newbie_01
4 Replies