X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=3.4 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FORGED_YAHOO_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Raman Ravi Subject: Re: Problem with date after date is modified in scripts Date: Sat, 20 Nov 2010 08:45:16 +0000 (UTC) Lines: 48 Message-ID: References: <20101118114506 DOT GE18309 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Raman Ravi yahoo.com> writes: > > Corinna Vinschen cygwin.com> writes: > > > > > > > WOuld appreciate some help in understanding and more importantly resolving > > > this issue. > > > > This is a shortcoming in Cygwin itself. You can only workaround it > > by setting the date from a Cygwin process for now. This will only > > affect Cygwin processes running in the same user session, though. > > There's a TODO in the affected code in Cygwin which describes this > > very problem. Unfortunately this requires a redesign of the code > > in question... > > > > Corinna > > > > Hi Corinna, > > Thanks for the reply (and information). I guess I have to retrieve the time > using a "windows call" from my TMSERVER and then set the date/time back using > date command in shutdown.sh > > Thanks. > Raman > > Have a goofy solution but it works (if anybody else is interested) 1. Create a script to get the time string getTimeStr #!/bin/sh net time "\\\\$TMSERVER" 2nd shell script "syncTime" contains #!/bin/sh TMSTR=`getTimeStr | grep Current | awk '{print $6,$7,$8}'` date +"%m/%d/%Y %H:%M %p" -s "$TMSTR" >> $REG_DEV_NULL -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple