Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need to get 4 Hrs back time and compare with successive time Post 302214962 by Perderabo on Tuesday 15th of July 2008 08:39:55 AM
Old 07-15-2008
You have this: 'print localtime(time() - 14400+$i) . "\n"' which is a single-quoted string. It is stopping the shell from replacing $i with the value. You must move $i outside of the single quotes. So turn your single-quoted string into one single-quoted string, then $i, then another single-quoted string.



`perl -e 'print localtime(time() - 14400+'$i') . "\n"'`
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Rolling back time

Hi all, Have a small problem. Back in October the pervious sys-admin (of a client's company) made the necessary adjustments to the system clock for daylight savings (Sydney time - +11 GMT). As far as I can gather, they just amended the time - NO TIMEZONE !?! Is there an effective and safe... (5 Replies)
Discussion started by: Cameron
5 Replies

2. SuSE

Time resetting to 00 HRS on starting

I Have a SUSE Linux Enterprise server 9.0. When I start the server , using date command I daily find that the time it is showing is 00.00 Hrs. It shows the date correctly. Every day I have to set the time using the date command. I am facing this proble from last 3 weeks but couldn't find a... (4 Replies)
Discussion started by: V.V.KUMAR
4 Replies

3. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

4. What is on Your Mind?

Well it took a bit of time but I am back on the road again...

I have not been very active on here for a while and when I have it was with CygWin... Well this MBP had to go back to the Apple Store for a new disk drive. It was repaired under warranty and I was very pleased with the service. However, returning this tub back to not quite the same as it was... (0 Replies)
Discussion started by: wisecracker
0 Replies
Date::Language::Bulgarian(3)				User Contributed Perl Documentation			      Date::Language::Bulgarian(3)

NAME
Date::Language::Bulgarian - localization for Date::Format DESCRIPTION
This is Bulgarian localization for Date::Format. It is important to note that this module source code is in utf8. All strings which it outputs are in utf8, so it is safe to use it currently only with English. You are left alone to try and convert the output when using different Date::Language::* in the same application. This should be addresed in the future. SYNOPSIS
use strict; use warnings; use Date::Language; local $=$/; my $template ='%a %b %e %T %Y (%Y-%m-%d %H:%M:%S)'; my $time=1290883821; #or just use time(); my @lt = localtime($time); my %languages = qw(English GMT German EEST Bulgarian EET); binmode(select,':utf8'); foreach my $l(keys %languages){ my $lang = Date::Language->new($l); my $zone = $languages{$l}; print $/. "$l $zone"; print $lang->time2str($template, $time); print $lang->time2str($template, $time, $zone); print $lang->strftime($template, @lt); } AUTHOR
Krasimir Berov (berov@cpan.org) COPYRIGHT
Copyright (c) 2010 Krasimir Berov. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2010-12-15 Date::Language::Bulgarian(3)
All times are GMT -4. The time now is 04:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy