2012/10/16 Eli Zaretskii <eliz@...>
> > Date: Tue, 16 Oct 2012 12:40:16 -0300
> > From: Renato Silva <br.renatosilva@...>
> > > The simple solution is to set your windows environment variable as you
> > > expect then change the variable in your ~/.profile file for MSYS to
> > > what POSIX expects.
> > I'm sorry but that's the very problem not a solution :( Maybe it wasn't
> > clear but I'm already setting TZ from within MSYS (in /etc/profile), and
> > run MSVCRT programs from within Bash, so whatever it was in Windows gets
> > overwritten. In Windows, I need TZ unset because MSVCRT works just fine
> > without it, in fact TZ is just a way to break system settings here. The
> > best solution I've figured out so far is caching my desired TZ value in
> > some other variable in /etc/profile or similar (because the DST period
> > comes from a Ruby script), then set TZ with the cached value for each
> > command I manage to figure out to be using MSYS runtime for local time
> > (currently date and ls).
> Which MSVCRT programs do you run from the MSYS Bash, and why?
> If that's Bazaar, can you run it from the "normal" cmd window instead?
Hi Eli, I use Bash with MinTTY as my command line interface in Windows,
because, you know, cmd.exe really sucks. But yes, that would work, but it's
worse than my current approach of adding aliases for each MSVCRT program I
run within bash (or my planned approach to conversely cache TZ and set it
for date, ls etc.). It's worse because every time I run Bazaar, I must
remember to run separately in cmd.exe, in fact it's easier to just "env -u
TZ bzr" ad hoc, and more easier if done once in bash login. From what I can
remember right now, Bazaar, Python and Ruby are the only MSVCRT
applications I'm aware of using from Bash, but as said cmd.exe is not an
option for me.
> IOW, if you can arrange things such that only MSYS programs are run
> from the MSYS Bash window, and MSVCRT programs are run either from cmd
> or by clicking on the desktop, then you can set TZ in Bash to what
> Posix programs expect, and keep that TZ value out of sight of the
> MSVCRT programs, which will see the system-wide value (or no value at
> all) you set through My Computer and/or Registry.
> Anything else is either going to be painful or plainly won't work,
> because the restricted syntax of TZ supported by the MS runtime is not
> useful even in the US these days.
> As I said having TZ either unset for bzr/python/etc. or set for
date/ls/etc, by means of an alias, is going to work, except that each
single command needs to be tracked down and added to the list. Yes, it is
such an unfortunate coincidence Microsoft decided to implement
functionality for TZ as well, but different from POSIX.
If you want MSYS and native Windows programs live in peace, don't mix
> them in the same window and environment. The only exception to this
> rule is the compiler and Binutils needed to create MinGW programs --
> and that's because MSYS was specially and carefully crafted to allow
> this very kind of jobs.
Well, my current solution works great, and this is the only considerable
problem I have faced so far between Bash and Windows. I'm sure addding
zoneinfo to MSYS would fix it quite well though, I don't think it would be
an extravagance, and I don't believe it would be hard to implement.
Actually, I'm still not convinced that MSYS has no support for zoneinfo at
all, maybe it was just me that didn't set up it correctly. Or maybe glibc
used by MSYS is really ancient, who knows... but here I am to know :)
For you all, I really appreciate your suggestions, thanks... but if someone
knows specifically about zoneinfo it would be great to know... I think I
explained my doubts more clearly there in the Stack Overflow post.
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
MinGW-users mailing list
This list observes the Etiquette found at
We ask that you be polite and do the same. Disregard for the list
etiquette may cause your account to be moderated.
You may change your MinGW Account Options or unsubscribe at: