- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- URGENT HELP REQUIRED on DATE to add 1 or more days...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 09:56 PM
тАО03-11-2010 09:56 PM
I have a written a script ,
which converts currenr date into epoch seconds
and add number of days (ex: 1 ,2,3)
multilpy the days*86400 seconds
convert that seconds into date
every day i am adding 1 or 2 days depending on the requirement to the current date
but this is not adding one day when the time zone is from BST to GMT as 1 hour reduces
for that i have written only for that particular day if the passed date and coneverted date are same then add 25 hours for that particular day
but when i am passing days to add while converting from BST to GMT i am getting only one day is adding
Solved! Go to Solution.
- Tags:
- DST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 10:34 PM
тАО03-11-2010 10:34 PM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
Please check on this thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1411389
The perl script that James has posted. There is also an older thread listed there.
strftime just converts the seconds into a desired format.
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 10:38 PM
тАО03-11-2010 10:38 PM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
How about if you just do the calculation like you do now, but then overwrite the hour/minute/second part of the answer with the hour/minute/second of the original date?
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 11:02 PM
тАО03-11-2010 11:02 PM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
Else if you share your script which makes that, and an example, it may be more easy to help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 01:09 AM
тАО03-12-2010 01:09 AM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
script and eaxmple given below
proc Lb_AddDaysToDateWithoutTime { pm_current_date pm_days }{
set lv_epochCurrentDate [mktime $pm_current_date ]
local lv_futureSec [expr $pm_days * 86400]
local lv_futureAdd [expr $lv_epochCurrentDate + $lv_futureSec]
local lv_futureConvert [date $lv_futureAdd]
return $lv_futureConvert
}
example :
dsd >puts [Lb_AddDaysToDateWithoutTime 20101031 1]
answer : 20101031
dsd >puts [Lb_AddDaysToDateWithoutTime 20101030 1]
answer : 20101031
Please look into above example, now the time zone is GMT0BST
same script is working fine when time zone is GMT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 01:50 AM
тАО03-12-2010 01:50 AM
SolutionSince you calculate the date at 0:0:0 when you add 86400sec, you will be on the same day at 11pm
So workarounds: make the calculation at midday (12:00:00)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 01:54 AM
тАО03-12-2010 01:54 AM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
local lv_futureSec [expr $pm_days * 86400 + 43200]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 02:02 AM
тАО03-12-2010 02:02 AM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
but i need to check with the design team whether we can take midday timeor not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 02:11 AM
тАО03-12-2010 02:11 AM
Re: URGENT HELP REQUIRED on DATE to add 1 or more days getting error date when BST to GMT time conversio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 11:44 AM
тАО03-12-2010 11:44 AM