Where are you when you execute your commands?
On what kind of file system?
Just so we agree on your output, can you type it again but this time I suggest you type:
For it doesnt look like a timezone issue but more like 2 boxes not having the time since one says 27min and the other 21...
Greetings all,
I have been battling with this problem for some time now, and I am not sure if I am just not seeing the obvious anymore or have made a stupid mistake, but I just can seem to get the reverse address in my network to run the right way.
Short description of my network:
I have a... (3 Replies)
1. The problem statement, all variables and given/known data:
When looking for corefiles, include any file with core in its name. (Some UNIX/Linux systems add the PID of the process that created the core to reduce the chances of overwriting an already existing core file that might be needed. The... (6 Replies)
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
I need to be able to identify files with file timestamps greater than a given timestamp.
I am using the following solution, although it appears to compare files at the "seconds" granularity and I need it at the milliseconds. When I tested my solution, it missed files that had timestamps... (3 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT PHP
date_default_timezone_set
DATE_DEFAULT_TIMEZONE_SET(3) 1 DATE_DEFAULT_TIMEZONE_SET(3)date_default_timezone_set - Sets the default timezone used by all date/time functions in a script
SYNOPSIS
bool date_default_timezone_set (string $timezone_identifier)
DESCRIPTION date_default_timezone_set(3) sets the default timezone used by all date/time functions.
Note
Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the
timezone isn't valid, and/or a E_WARNING message if using the system settings or the $TZ environment variable.
Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the
default timezone.
PARAMETERS
o $timezone_identifier
- The timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available in the "List of Supported Time-
zones".
RETURN VALUES
This function returns FALSE if the $timezone_identifier isn't valid, or TRUE otherwise.
EXAMPLES
Example #1
Getting the default timezone
<?php
date_default_timezone_set('America/Los_Angeles');
$script_tz = date_default_timezone_get();
if (strcmp($script_tz, ini_get('date.timezone'))){
echo 'Script timezone differs from ini-set timezone.';
} else {
echo 'Script timezone and ini-set timezone match.';
}
?>
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Now throws E_WARNING rather than E_STRICT. |
| | |
| 5.1.2 | |
| | |
| | The function started to validate the $time- |
| | zone_identifier parameter. |
| | |
+--------+---------------------------------------------------+
SEE ALSO date_default_timezone_get(3), "List of Supported Timezones".
PHP Documentation Group DATE_DEFAULT_TIMEZONE_SET(3)