🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.shell.unix.bourne-bash
Article #8

Re: time zone 1 hr east of

#8
From: Bill Marcum
Date: Sun, 05 Aug 2012 14:56
27 lines
2047 bytes
On 07/31/2012 01:19 AM, The Derfer wrote:
> For a script I need to create file names with date embedded in them,
> and since a lot of the files arrive (the box is in CDT) after midnight
> EDT
> but just prior to it in CDT, I issue this at the top of the script:
>
> export TZ=America/New_York
>
> ... and get file names created for what (to CDT) would be the next
> day.
> Which is what I need.
>
> But that doesn't help me if the files I need to rename arrive prior to
> 11 PM CDT.
> What is the next time zone east of America/New_York (1 hour east) and
> hence,
> how would I modify the above command to reflect it?   It's the only
> easy way to
> force the script to rename files with the next day's date in it.
> Otherwise the next
> script that needs to process them will think they're the previous
> day's files and
> error out.
> Thanks in advance.
>
You could use TZ=America/Halifax, or if you have GNU date,
date -d 'now + 2 hours'
Technical Details
Message-ID: <jvm1i5$jv5$1@speranza.aioe.org>
Path: arc1-ca.pugleaf.net!q11ni55896770wiw.1!nntp.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail
References: <f5e80503-8632-4e5e-a4f1-7db1fd8a95f7@u20g2000yqk.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1054c0,101dda0a2fd289b0
X-Google-NewGroupId: yes
X-Google-Attributes: gid4d82dd0a1,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.180.103.197 with SMTP id fy5mr664732wib.1.1344178570137;
        Sun, 05 Aug 2012 07:56:10 -0700 (PDT)
Path: arc1-ca.pugleaf.net!q11ni55896770wiw.1!nntp.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail
From: Bill Marcum <bill@nowhere.invalid>
Newsgroups: alt.comp.lang.shell.unix.bourne-bash,gnu.bash
Subject: Re: time zone 1 hr east of
Date: Sun, 05 Aug 2012 10:56:07 -0400
Organization: Aioe.org NNTP Server
Lines: 28
Message-ID: <jvm1i5$jv5$1@speranza.aioe.org>
References: <f5e80503-8632-4e5e-a4f1-7db1fd8a95f7@u20g2000yqk.googlegroups.com>
NNTP-Posting-Host: VZQviU2OUdAf8BEPUCCg0A.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0
X-Notice: Filtered by postfilter v. 0.8.2
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit