Sponsored Content
Top Forums Shell Programming and Scripting Date increment issue due to day light saving Post 302365464 by rajbravo on Tuesday 27th of October 2009 06:39:50 AM
Old 10-27-2009
Date increment issue due to day light saving

The date increment worked fine until date reached 25/10, which is DLS change date.

/bin/date --date="091025 1 day" +%y%m%d;

the output is 091025

Is this a bug or something missing from the code !

Last edited by fpmurphy; 10-27-2009 at 10:27 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Time Zone - Day Light Savings

Our system has an option to supply your timezone in area of world you want to keep time for user transactions and such. It keeps time zone for user in database as for example -5 for EST. The problem is we are in EDT -4 (daylight savings time) so the time is displayed wrong. We can put the... (2 Replies)
Discussion started by: photon
2 Replies

2. UNIX for Dummies Questions & Answers

Day light savings

Does anyone know how to reset a network printer to allow for the daylight savings?:) (0 Replies)
Discussion started by: Tweedy
0 Replies

3. AIX

Day Light Savings Time problem

Hi guys, OS: AIX 5.3.0.0 I'm from Portugal and I had problems about Day Light changing time, the hour's changes in first Sunday of November, but it's wrong because in Europe the day light need to change in last Sunday of October. My TZ is TZ=GMT0BST, that I think BST it's British Summer Time. I... (2 Replies)
Discussion started by: uadm26
2 Replies

4. Red Hat

not able to Send mail due to Security Issue

Hi All, I am trying to send a mail from my application through SMTP in solaris 9 but unable to send a mail.Same code is able to send mail in Windows. As unix has more security,So as per me,it is due to security reason.. So please let me know what I need to do to send a mail properly. what... (5 Replies)
Discussion started by: smartgupta
5 Replies

5. Shell Programming and Scripting

How to increment a user defined date value in the DATE format itself using shell script?

I need to increment a date value through shell script. Input value consist of start date and end date in DATE format of unix. For eg. I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr. The output must look like 1/1/09 2/2/09 . . . 31/1/09 . . 1/2/09 . 28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies

6. Shell Programming and Scripting

Increment in date

Hi, I have a variable lets say DATA_DATE. I have to pass some value to this variable in YYYYMMDD format. lets say today I have passed this variable as : DATA_DATE=20100107 Then pls help me how to calculate another variable DATA_DATE1 (which is DATA_DATE+1). The code should work... (3 Replies)
Discussion started by: 46019
3 Replies

7. Shell Programming and Scripting

Date increment

hi Friends, Today_Dt=`date "+%Y-%m-%d"` So the Today date is 2010-05-03 I have a file which has date values as below 2010-04-27 2010-04-02 2010-04-18 2010-04-28 2010-04-29 .. (1 Reply)
Discussion started by: Gopal_Engg
1 Replies

8. Shell Programming and Scripting

how to update date part with new increment date time

hi experts, my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies

9. Shell Programming and Scripting

Shell script issue on date and day

Hi friends, I wanna check if any given date is Friday, as an example I have written a simple script as shown below #!/bin/ksh v_date=20140325 if ; then echo 'HELLO' else echo 'BYE' fi But when I am executing its throwing an error as shown below, (3 Replies)
Discussion started by: Aditya_001
3 Replies

10. Linux

Linking issue due to so version number

Hi all, currently I'm facing a issue in linking a .so file. In my build machine, I've libcrypto.so.6 and there is a softlink as libcrypto.so. In my make file I'm trying to link to the lib using -L -lcrypto and it is success and created my test.exe. When I copy this test.exe to other... (4 Replies)
Discussion started by: vijkrr
4 Replies
DATETIME.MODIFY(3)							 1							DATETIME.MODIFY(3)

DateTime::modify - Alters the timestamp

       Object oriented style

SYNOPSIS
public DateTime DateTime::modify (string $modify) DESCRIPTION
Procedural style DateTime date_modify (DateTime $object, string $modify) Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime(3). PARAMETERS
o $object -Procedural style only: A DateTime object returned by date_create(3). The function modifies this object. o $modify -A date/time string. Valid formats are explained in Date and Time Formats. RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.6 | | | | | | | Absolute date/time statements now take effect. | | | Previously, only relative parts were used. | | | | | 5.3.0 | | | | | | | Changed the return value on success from NULL to | | | DateTime. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 DateTime.modify(3) example Object oriented style <?php $date = new DateTime('2006-12-12'); $date->modify('+1 day'); echo $date->format('Y-m-d'); ?> Procedural style <?php $date = date_create('2006-12-12'); date_modify($date, '+1 day'); echo date_format($date, 'Y-m-d'); ?> The above examples will output: 2006-12-13 Example #2 Beware when adding or subtracting months <?php $date = new DateTime('2000-12-31'); $date->modify('+1 month'); echo $date->format('Y-m-d') . " "; $date->modify('+1 month'); echo $date->format('Y-m-d') . " "; ?> The above example will output: 2001-01-31 2001-03-03 SEE ALSO
strtotime(3), DateTime.add(3), DateTime.sub(3), DateTime.setDate(3), DateTime.setISODate(3), DateTime.setTime(3), DateTime.setTimes- tamp(3). PHP Documentation Group DATETIME.MODIFY(3)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy