Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.05; 'subject:How': 0.09; 'received:internal': 0.09; 'subject:script': 0.09; 'thu,': 0.15; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:compute4.internal': 0.16; 'received:messagingengine.com': 0.16; 'wrote:': 0.16; 'header:In- Reply-To:1': 0.24; 'skip:_ 10': 0.32; 'attempt': 0.35; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'from:no real name:2**0': 0.60; 'header:Message-Id:1': 0.61; 'email addr:gmail.com': 0.62; '30,': 0.63; 'hour': 0.69; 'jul': 0.72; 'subject:write': 0.84; 'subject:this': 0.85 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=AXevLeFxEfrecA26jIkVl+eW2sk=; b=TVYa12 GywLQAWbubpCL6ufPKckcXJ0uHLZ7FOJEIA2vwjR2krIPJHZl95fzbOuHQCCDfn2 0X7DZq1/eq4UEXQzKke8tSSdbCMXakprTLsRtTO7i/42Xo2uZcZkLxoZn7aDfKry er2KbiQPefaK3HQWyMUkEbUbU5kuYWPa0+/tM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=AXevLeFxEfrecA2 6jIkVl+eW2sk=; b=XKXR+Nz6WSjK6GqtkKvTs4vltDJrqAAqWVMbRxqh7QKdHsv hQ/AME9nr9wFiio6DyaGZTN4UcT/HnfVcnW5P5JVUXz2JhP1H5kmxnFG3uo2VYPC UA4B2hAr3oL3YgPOYD4RE/TSbTZ31zXE6lQecXkvg57XTVBpQ53nY/+hwEb0= X-Sasl-Enc: 43Qu/FPyqh9xkhhdwhmwXC4scM2lLGyTrVQ5FPMAI6bf 1438287434 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-63a5d8c6 In-Reply-To: References: Subject: Re: How to re-write this bash script in Python? Date: Thu, 30 Jul 2015 16:17:14 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438287442 news.xs4all.nl 2832 [2001:888:2000:d::a6]:53336 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3678 X-Received-Body-CRC: 264625559 Xref: csiph.com comp.lang.python:94789 On Thu, Jul 30, 2015, at 14:31, sutanu.das@gmail.com wrote: > _year=$(date -d "-5 hour" +%Y) > _month=$(date -d "-5 hour" +%m) > _day=$(date -d "-5 hour" +%d) > _hour=$(date -d "-5 hour" +%H) What is the purpose of the -5 hour offset? Is it an attempt to compensate for timezones?