03-12-2010
Quote:
I tried the same script in another system fedora 11, it works..
Out of curiosity, I tested it on Fedora 12. The output was:
Quote:
Mon Jan 1 00:00:00 LMT 0001
which was interesting. I have no clue what LMT 0001 means. Does not show up in the coreutils date source code.
The reality is that any output from the date command is meaningless. There was no concept of calendar months or even calendar years as we know them today in that era.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
2. UNIX for Dummies Questions & Answers
If I use the find command to find files older than n days I have to enter
find . -mtime +(n-1). I tried this on a Solaris 9 system and also Linux. Is this something that all Unix veterans know about (I'm new to Unix)? If so, maybe my man pages need to be updated (how to do this?). :confused: (4 Replies)
Discussion started by: ceanntrean
4 Replies
3. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
4. HP-UX
Dear Frends,
Could you please help me with the command or option by which I can find
day where the input is date(can be of future or past).
I do have for linux, However it is not working @ hp unix.
Please help.
Regards
Rahul (4 Replies)
Discussion started by: Rahul chitriv
4 Replies
5. Shell Programming and Scripting
Hi,
We have a requirement to find the set of filenames from the group of files in a specified folder based on
(i) version number
(ii) sequence number
such that, for any given sequence number in a day only the latest version filenames have to indentified.
Below is the format of... (4 Replies)
Discussion started by: Deepakbabu
4 Replies
6. Shell Programming and Scripting
Hello All,
I need a bash shell script to find out a day from the date.For example we give the date(20100227/YYYYMMDD) then we get the day 'Saturday'.
Thanks in advance,
Satheesh (5 Replies)
Discussion started by: satheesh4093
5 Replies
7. Shell Programming and Scripting
Hi,
I need to find all files of particular day lets say for 2nd august in below.
-rw-r--r-- 1 skl eusdc 8168 Aug 5 19:31 aabc123.txt
-rw-r--r-- 1 skl eusdc 4251 Aug 5 19:31 aabc124.txt
-rw-r--r-- 1 skl eusdc 4252 Aug 6 19:31 aabc125.txt
-rw-r--r-- ... (15 Replies)
Discussion started by: sachinkl
15 Replies
8. Shell Programming and Scripting
Hi,
I would like to write a script that checks if a file ('counter') was modified the previous day, if so erase its contents and write 00000000 into it.
For e.g. if the file 'counter' was last modified at 11.30pm on 24th May and the script runs at 12.15am of 25th May, it should erase it's... (1 Reply)
Discussion started by: hegdepras
1 Replies
9. HP-UX
In HP-UX the date command does not have the "-d" switch like some other *nixes do. I'm working a simple script to tell me, given the day, month and year what day of the week that falls on.
Assuming valid day, month and year input (I'd perform quality checks on the input separately, but not... (5 Replies)
Discussion started by: rwuerth
5 Replies
10. Shell Programming and Scripting
Hi Experts,
i am using the below code get the date of previous day.
#!/usr/bin/ksh
datestamp=`date '+%Y%m%d'`
yest=$((datestamp -1))
echo $yest
When i execute the code i am getting output as:
20130715
What i am trying here is, based on the date passed i am fetching previus day's... (0 Replies)
Discussion started by: learner24
0 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)