Sponsored Content
Top Forums Shell Programming and Scripting "date" difference between FreeBSD & Linux Post 302463136 by Corona688 on Friday 15th of October 2010 10:37:20 PM
Old 10-15-2010
Your utility assumes a 32-bit time type, and has lots of bugs on 64-bit platforms where the 2038 limit no longer applies; but is so complicated I'm not sure where to begin fixing it. I've fixed it to the point where it outputs random times instead of segfaulting..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Nescape & dial up networking "Linux"

Sorry I need to Know How to connect to the Internet using Netscape in the GUI of the Red Hat Linux .....using phone line with a modem Us robbitics ....Such as in windows We add dial up adapter etc ......:confused: (1 Reply)
Discussion started by: atiato
1 Replies

2. What is on Your Mind?

[[ $(date +%Y) == 2007 ]] && echo "Happy New Year"

Same as the Title! :) (2 Replies)
Discussion started by: ripat
2 Replies

3. Shell Programming and Scripting

Difference between ">/dev/null 2>&1" and "2>&1 >/dev/null"

Does >/dev/null 2>&1 and 2>&1 >/dev/null mean the same? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

4. Solaris

difference between "root" and "usr" packages

Hi, could someone pls enlighten me on the difference between the "root" package and "usr" package? Like in this example: pkginfo -l SUNWGtku | grep -i desc DESC: GTK - The GIMP Toolkit (Usr) and pkginfo -l SUNWGtkr | grep -i desc DESC: GTK - The GIMP Toolkit (Root)... (6 Replies)
Discussion started by: masloff
6 Replies

5. UNIX for Dummies Questions & Answers

Difference between "/bin/bash" & "/bin/sh"

what if the difference between #!/bin/sh and #!/bin/bash I wrote a script with the second heading now when i change my heading to the first one ...the script is not executing well....im not getting the required output....any solution to this problem...or do i have to start the... (3 Replies)
Discussion started by: xerox
3 Replies

6. Red Hat

files having Script which works behind "who" & "w" commands

Dear All, plz print the path of files which have the script of "who" & "w" commands. thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies

7. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

8. Web Development

How would I mod_rewrite "/~a1Pha" and "/=a1Pha" to "/paste/a1Pha.htm"? (internally & externally)

Basically I want to shorten URLs on my html pasting site (pasteht.ml), by using "/~a1Pha" instead of "/paste/a1Pha". The ID is 5 numbers and letters, both cases. For example: /~idnum serves /paste/idnum.htm /=idnum serves /paste/idnum.htm /paste/idnum redirects to /~idnum (to update any old... (0 Replies)
Discussion started by: phillips1012
0 Replies
time(3) 						     Library Functions Manual							   time(3)

NAME
time, time64, TIMET32TO64, TIMET64TO32 - Gets time, converts time between time_t and time64_t LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <time.h> time_t time( time_t *tloc); The following data type, function declaration and macros are Compaq extensions and do not conform to current standards. These features are provided to support the time64_t data type and are accessible only when the _TIME64_T feature macro is defined during compilation. #include <time.h> typedef long time64_t; time64_t time64( time64_t *tloc64); void TIMET32TO64(t32, t64) int TIMET64TO32(t64, t32) PARAMETERS
Points to the location where the return value of type time_t is stored. When this parameter is a null pointer, no value is stored. Points to the location where the return value of type time64_t is stored. When this parameter is a null pointer, no value is stored. Refers to a variable of type time_t. Refers to a variable of type time64_t. DESCRIPTION
The time() function returns the time in seconds since the Epoch. The Epoch is referenced to 00:00:00 CUT (Coordinated Universal Time) 1 Jan 1970. The time64_t data type is a 64-bit signed value which, like the 32-bit time_t data type, is defined as the "time in seconds since the Epoch." It is provided for storage and manipulation of times beyond the range of a 32-bit time_t (Dec 13 20:45:52 GMT 1901 through Jan 19 03:14:07 GMT 2038). This data type is only available when the _TIME64_T feature macro is defined during compilation. The time64() function works exactly as the time() function, but uses the larger time64_t type (referenced by the tloc64 pointer) instead of time_t. The current system time setting limits (Jan 1 00:00:00 GMT 1970 through Jan 19 03:14:07 GMT 2038) are not changed by this function or the time64_t data type. This function declaration is only available when the _TIME64_T feature macro is defined during compilation. The TIMET32TO64() and TIMET64TO32() macros are provided to assist developers converting between values of type time_t and values of type time64_t. The TIMET32TO64() macro converts the value contained in t32 to a value of type time64_t and stores the result in t64, performing sign-extension as appropriate. The TIMET64TO32() macro attempts to convert the value contained in t64 to a value of type time_t, storing the result in t32. If the value of t64 overflows the size of a time_t, the value of the TIMET64TO32() macro will be 1 and the value of t32 is undefined. Otherwise, the value of the TIMET64TO32() macro will be 0 and t32 will contain the converted value from t64. These conversion macros are only available when the _TIME64_T feature macro is defined during compilation. RETURN VALUES
Upon successful completion, the time() function returns the value of time in seconds since the Epoch. Otherwise, the value (time_t)-1 is returned. Upon successful completion, the time64() function returns the value of time in seconds since the Epoch. Otherwise, the value (time64_t)-1 is returned. RELATED INFORMATION
Functions: gettimeofday(2), clock(3), ctime(3), difftime(3), stime(3), strftime(3), strptime(3) Standards: standards(5) delim off time(3)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy