Sponsored Content
Operating Systems HP-UX Getting numeric timezone on HP-UX Post 302674343 by flagman5 on Thursday 19th of July 2012 11:55:59 AM
Old 07-19-2012
Getting numeric timezone on HP-UX

Hi

I thought the UNIX command date is universal and so I have been using

date +%z to get the numberic timezone offset (e.g. -0500)

however on HP-UX, this is not returning expected results; on my machine it returns the name of the time zone (e.g. EST) not numbers.

does anyone know how to get the number timezone offset on HP-UX?

thanks for your help
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Timezone

Hello again, under hp-ux i have a file /etc/TIMEZONE. here is definied which timezone i am. i dont know who reads this file to set after reading the timezone under /usr/lib/tztab. my 2 questions, who reads the file /etc/TIMEZONE ( which service ) and do i need in the first line to set my... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies

2. UNIX for Dummies Questions & Answers

Timezone

Hi, I got an question about changing timezone thrue command line on a SunOS Release 4.1.2 without restarting the computer. Now it's set on WET and I want to set the timezone to CET (GMT +1) Plz somebody help me. Regards Novisern:confused: (5 Replies)
Discussion started by: Novisern
5 Replies

3. UNIX for Dummies Questions & Answers

timezone

Hi, i am searching to change the timezone on a HP-UX11 system. Since last weekend the summertime started i am not able to change the time to the new time, every day the time changes back to wintertime. I think the problem is that the server is on the wrong timezone. Can someone help me please?... (1 Reply)
Discussion started by: eddyvdv
1 Replies

4. UNIX for Advanced & Expert Users

Timezone

HI ; I got Solaris8 installed oon Sunfire V440 .I have TZ=GMT in /etc/TIMEZONE , but when i log in as root i see the date in GMT+1. So i have every time to "set TZ=GMT ; export $TZ" . How can i set the TZ=GMT at the startup defenitely. Thanks :) (7 Replies)
Discussion started by: oss
7 Replies

5. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

6. Solaris

Timezone query

Hi Everyone, We have Solaris server which displays the time in CET and our application is used across the globe.(Users are in singapore, poland, US). At present in order to display Timezone we are manually manupulating time based on country in a enviromental file. I want to know , do we... (2 Replies)
Discussion started by: gehlnar
2 Replies

7. Shell Programming and Scripting

Help with timezone conversion

Hi, Date_ConvTZ of module Date:Manip, converts time zone to specified server but without day time savings... $mod = Date_ConvTZ($date,"$thisTZ","$serverTZ"); US and UK timezone difference is 5 hrs, but above function will return difference of 4 hrs. Please help (1 Reply)
Discussion started by: darshakraut
1 Replies

8. Red Hat

changing timezone

Hi, I would like to change time zone Linux from IST to US/Canada but not getting the option , I have run the command setup -> timezone configuration but not getting the option of us/canada or pacific us/canada. Please suggest. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

9. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

10. Solaris

TIMEZONE problem..

hii there... can you guys help me with TIMEZONE setting on my solaris box i tried to edit cat /etc/TIMEZONE..but i think it will work after rebooting, but something i did which took me to GMT my problem is i have this issue on a server, and i have to fix this without rebooting. thanks for... (1 Reply)
Discussion started by: 6pound
1 Replies
DateTime::Format::DateParse(3)				User Contributed Perl Documentation			    DateTime::Format::DateParse(3)

NAME
DateTime::Format::DateParse - Parses Date::Parse compatible formats SYNOPSIS
use DateTime::Format::DateParse; my $dt = DateTime::Format::DateParse->parse_datetime( $date ); my $dt = DateTime::Format::DateParse->parse_datetime( $date, $zone ); DESCRIPTION
This module is a compatibility wrapper around Date::Parse. USAGE
Import Parameters This module accepts no arguments to it's "import" method and exports no symbols. Methods Class Methods o parse_datetime($date [, $zone]) Accepts a Date::Parse compatible $date string and optionally a Time::Zone compatible $zone string. Returns a DateTime object. GOTCHAS
o If parse_datetime is called on a $date that doesn't know specify a timezone and $zone is not set, then the timezone of the returned DateTime object will be set to the "local" timezone. This is consistent with the behavior of Date::Parse. o If parse_datetime is called without a $zone but the $date string does specify a timezone/offset or if parse_datetime is called with a $zone that DateTime::TimeZone does not understand, the returned DateTime object will have it's timezone set to a fixed offset from UTC. This means that "DST" information is not available and date math will not reflect "DST" transitions. This may be resolved for true timezones by using the DateTime::TimeZone::Alias module to "alias" the Time::Zone timezone to an Olson DB name. This may be done automatically in a future release. CREDITS
Graham Barr (GBARR) <gbarr@pobox.com>, author of Date::Parse Everyone at the DateTime "Asylum". SUPPORT
Support for this module is provided via the <datetime@perl.org> email list. See <http://lists.perl.org/> for more details. AUTHOR
Joshua Hoblitt (JHOBLITT) <jhoblitt@cpan.org> COPYRIGHT
Copyright (c) 2005-6 Joshua Hoblitt. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the licenses can be found in the LICENSE file included with this module, or in perlartistic and perlgpl as supplied with Perl 5.8.1 and later. SEE ALSO
Date::Parse, Time::Zone, DateTime, DateTime::TimeZone, DateTime::TimeZone::Alias, <http://datetime.perl.org/> perl v5.16.3 2014-06-10 DateTime::Format::DateParse(3)
All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy