Sponsored Content
Top Forums Shell Programming and Scripting Script to convert GMT to Asia/Hong Kong time Post 302176922 by jim mcnamara on Wednesday 19th of March 2008 03:11:43 PM
Old 03-19-2008
TZ is a per process thing, set it back to EST5EDT or whatever when you are done in the script. This DOES NOT AFFECT SYSTEM TIME.

Code:
hong_kong()
{
   TZ=HST-8HST
   date "+%c"
   TZ=CST6CDT
}

 

9 More Discussions You Might Find Interesting

1. Solaris

Setting TImezone fr Hong kong

Hi, In solaris how to change the timezone to display to HKT I tried by putting TZ=Hongkong or TZ=Asia/Hong_kong but it is taking me to the display of CST. how to change it to HKT thanks Bala (1 Reply)
Discussion started by: Balamurugan
1 Replies

2. HP-UX

change time mode from BST to GMT

I want to know how to change the time zone from BST to GMT avoid the daylight savings in hp-ux (3 Replies)
Discussion started by: tomjones
3 Replies

3. Shell Programming and Scripting

Script to add time convert to seconds

Hi, What i am looking for and i am new to this too, is a bash script that will add time in the format hh:mm:ss and produce the answer in minutes or seconds. It needs to be a loop since there are hundreds of times in my file. This is data is from a CDR that calculates duration of time used. ... (2 Replies)
Discussion started by: trotella
2 Replies

4. Solaris

Installing Hong Kong Locale

Any help appreciated. I am connecting (FTP) to a NAS PRO box that is currently installed on one of our subnets in Hong Kong from a Solaris system running Solaris 10 (our backup server). The NAS box has a backup job that backs up all user documents locally. I am trying to ftp the docs from the NAS... (4 Replies)
Discussion started by: jamba1
4 Replies

5. Shell Programming and Scripting

Shell script to convert epoch time to real time

Dear experts, I have an epoch time input file such as : - 1302451209564 1302483698948 1302485231072 1302490805383 1302519244700 1302492787481 1302505299145 1302506557022 1302532112140 1302501033105 1302511536485 1302512669550 I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies

6. Post Here to Contact Site Administrators and Moderators

Server Upgrade Scheduled for Today - 7:30 GMT (2:30 PM Eastern Time)

Dear All, Today, somewhere around 7:30 GMT (2:30 PM Eastern Time) www.unix.com will go down for what we hope is around 15 - 20 minutes as we change out some hardware on the server. Thank you for your patience and support. Neo (0 Replies)
Discussion started by: Neo
0 Replies

7. Shell Programming and Scripting

GMT to local Time conversion

How can I convert the following date format: New Log Date = 2016-12-30 23:50:33 GMT from GMT time to local time? Thanks (13 Replies)
Discussion started by: mrn6430
13 Replies

8. Shell Programming and Scripting

Local time to GMT time

Gents, Please can help with this. the column in red is the local time the column in blue is the GPStime 4153152529951 2/12/17 12:00:04.980 951 2960 41531.0 52529.0 1170882022980002 4108153261942 2/12/17 12:00:07.944 942 2959 41081.0 53261.0 1170882025944002 41511523611660... (7 Replies)
Discussion started by: jiam912
7 Replies

9. Solaris

Convert GMT date and time to CST

I need away to convert the following GMT date and time value RAW_TME= 042720171530 "mmddccyyhhmm" to Localhost time. In this case it is in central time. Here is what I came up with but it does not look efficient: RAW_TME=042720171530 logmm=`echo $RAW_TME | cut -c1-2` logdd=`echo $RAW_TME |... (4 Replies)
Discussion started by: mrn6430
4 Replies
imgsc(1)						      General Commands Manual							  imgsc(1)

Name
       imgsc - Find HST GSC stars in FITS or IRAF image files

Synopsis
       imgsc [options] FITS or IRAF file(s)

Description
       Search  the  HST  Guide Star Catalog withing the area described by the world coordinate system in an image header.  This is a link to imcat
       rather than a separate executable.

Options
       -b [<RA> <Dec>]
	      Output in B1950, optional new image center in B1950 (FK4) RA and Dec

       -c <name>
	      Reference catalog (gsc, ujc, or tab table file

       -g <class>
	      Guide Star Catalog class (-1=all,0,3 (default -1)

       -h     Print heading, else do not

       -j [<RA> <Dec>]
	      Output in J2000, optional new image center in J2000 (FK5) RA and Dec

       -m [<bright magnitude>] <faint magnitude>
	      Limiting catalog magnitude(s) (default none, bright -2 if only faint is given)

       -n <num>
	      Number of brightest stars to print

       -p <scale>
	      Initial plate scale in arcsec per pixel (default 0)

       -s     Sort by RA instead of flux

       -t     Tab table to standard output as well as file

       -v     Verbose listing of processing intermediate results

       -w     Write tab table output file imagename.cat -z Use AIPS classic projections instead of WCSLIB; use CD matrix or CDELT instead of poly-
	      nomial solution.

See Also
       imcat(),imuac(),imusac(),scat()

Author
       Doug Mink, SAO (dmink@cfa.harvard.edu)

14 April 1998								WCS								  imgsc(1)
All times are GMT -4. The time now is 10:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy