Sponsored Content
Full Discussion: Time conversion in Unix
Top Forums UNIX for Advanced & Expert Users Time conversion in Unix Post 20118 by kamlakar on Monday 22nd of April 2002 08:24:32 AM
Old 04-22-2002
Question Time conversion in Unix

Hi,

Is there any way to get current time for a particular country using any unix command ?

I mean, If i want to find out current time in US or UK or anything ....

Any command or library routine available for that?
How it can be done in C on Unix?

Can anybody help me?

Thanks

--
Kamlakar
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

conversion from EPOCH timestamp to local time zone

hello gurus, i want a perl/shell script which once invoked should convert a set of EPOCH timestamps to local time ( IST..i want) . how does it work ,i have an idea on that..but writing a perl/shell script for it is not possible for me...so i need help for the same. my exact requirement is... (2 Replies)
Discussion started by: abhijeetkul
2 Replies

2. Programming

Conversion of time structure in C++

Hi frnds, I have written a code to get current time struct tm *locTime; time_t currentTime; time( &currentTime ); locTime = localtime(&currentTime ); Suppose now i get output time as 31-DEC-2007 00:00:00 What i want now is i want two strings where in one string i want to subtract... (1 Reply)
Discussion started by: electroon
1 Replies

3. Windows & DOS: Issues & Discussions

conversion of unix time format

help me to convert unix time format into windows time format using java i have linux time ex. 1075329297.572 (2 Replies)
Discussion started by: sari
2 Replies

4. Shell Programming and Scripting

time conversion

My local server is in UTC time whereas my remote server in in CST time. I get a sequential file from CST time server and the records in will contain the first line as a filename and the second line as date time like mentioned below. /abc/cde/f1.txt 2009-04-28 23:10:05 CST Now i need to... (3 Replies)
Discussion started by: HemaV
3 Replies

5. Shell Programming and Scripting

time conversion using nawk

hi, i've got an input file that contains 12345678 AAA 12345679 BBB 12345680 CCC where 1st column is epoch time while the second column are some string. I'm using nawk to do regular expression on the 2nd column and i need to convert the epoch time to human readable time e.g. 'yyyymmdd... (5 Replies)
Discussion started by: bing
5 Replies

6. Shell Programming and Scripting

Military type format date/time conversion

Hello All, I have a requirement to convert a 12 hour format to 24 hour time format and the sample input /out put is below Input Time format : Nov 2 2011 12:16AM Out Put Format : Nov 2 2011 0:16 Input : Nov 2 2011 4:16PM Out Put: Nov 2 2011 16:16 I have done this using a... (6 Replies)
Discussion started by: jambesh
6 Replies

7. Shell Programming and Scripting

Shell Script for Epoch Time Conversion

Hi there I came across this script online to convert Epoch time to proper date format, but I am receiving the following error Also, I have HISTTIMEFORMAT set in user's .profile so that their history output shows time stamps. Additionally I have changed their .history location to a dedicated... (9 Replies)
Discussion started by: hedkandi
9 Replies

8. Programming

Python conversion to epoch time

Hi. I have timestamps that I am trying to convert to epoch time. An example: I am trying to convert this to an epoch timestamp but have one little glitch. I have this: import time date_time = '' pattern = '' epoch = int(time.mktime(time.strptime(date_time, pattern))) print epoch... (1 Reply)
Discussion started by: treesloth
1 Replies

9. Shell Programming and Scripting

Date Time Zone Conversion (backwards of what I want)

I am trying to convert local time to time in Ireland. Instead it is going the opposite direction (taking the local time as it if were in Ireland and displaying that the time would be here). $ echo "$TZ"; date; date --date='TZ="Europe/Dublin" '"$(date)" America/Phoenix Mon, Apr 13, 2015... (7 Replies)
Discussion started by: Michael Stora
7 Replies

10. 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
FusionInventory::Agent::Tools::Unix(3pm)		User Contributed Perl Documentation		  FusionInventory::Agent::Tools::Unix(3pm)

NAME
FusionInventory::Agent::Tools::Unix - Unix-specific generic functions DESCRIPTION
This module provides some Unix-specific generic functions. FUNCTIONS
getDeviceCapacity(%params) Returns storage capacity of given device, using fdisk. Availables parameters: logger a logger object device the device to use getIpDhcp Returns an hashref of information for current DHCP lease. getFilesystemsFromDf(%params) Returns a list of filesystems as a list of hashref, by parsing given df command output. logger a logger object command the exact command to use file the file to use, as an alternative to the command getFilesystemsTypesFromMount(%params) Returns a list of used filesystems types, by parsing given mount command output. logger a logger object command the exact command to use file the file to use, as an alternative to the command getProcessesFromPs(%params) Returns a list of processes as a list of hashref, by parsing given ps command output. logger a logger object command the exact command to use file the file to use, as an alternative to the command getRoutingTable Returns the routing table as an hashref, by parsing netstat command output. logger a logger object command the exact command to use (default: netstat -nr -f inet) file the file to use, as an alternative to the command perl v5.14.2 2012-06-25 FusionInventory::Agent::Tools::Unix(3pm)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy