← Back to team overview

lubuntu-qa team mailing list archive

Re: [Lubuntu-comms] meetings!

 

ironically i based the time off of similar aliases i made using irssi's
exec command and some simple one line shell commands. in fact, i made them
to convert from utc to local and vice versa as well as for any other time
zone:

> 2local     exec - date -d 'TZ="UTC" $0-'
> 2localbytz exec - date -d "$0-"
> 2utc       exec - TZ=UTC date -d "$0- `date +%Z`"
> 2utcbytz   exec - TZ=UTC date -d "$0-"

I don't use any specific format because date's [string format][1] is really
flexible. of course, your script guarantees success, but date strings
pretty much do, too (especially check out the relative items) :)

usage is simply /script <date string>. just make sure for the ones that end
in bytz to add a descriptor for the time zone, e.g. UTC-7 or PST, though i
don't recommend the latter as it's potentially ambiguous. one thing it
won't accept is zoneinfo format (e.g. America/Los_Angeles). that being
said, you'll have to be sensitive to your own daylight savings time/summer
time.

with that, the non-bytz ones are somewhat extraneous but it keeps me from
having to type anything extra or figure out DST, since it leverages date to
get the current local time zone.

so you can see, i had a very refined system for dealing with the issue of
date and time conversions. the problem was, i tried to figure out what time
I'd show up at work rather than what time I'd be available. lesson learned:
no one is safe from the malicious hand of PEBKAC.

[1]: http://www.delorie.com/gnu/docs/sh-utils/sh-utils_3.html

@wxl | http://polka.bike
Lubuntu Release Manager & Head of QA
Ubuntu PPC Point of Contact
Ubuntu Oregon Team Leader
Ubuntu Membership Board & LoCo Council Member
Eugene Unix & GNU/Linux User Group Co-organizer
On Nov 13, 2015 4:08 AM, "Nio Wiklund" <nio.wiklund@xxxxxxxxx
<https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1&to=nio.wiklund@xxxxxxxxx>>
wrote:

> Den 2015-11-12 kl. 00:36, skrev Walter Lapchynski:
> > Well, I screwed up and got the time for today's wrong. I showed up an
> > hour late to our meeting. I did manage to get all the logs and have them
> > on the [page][1] we have dedicated to holding meeting notes. Make sure
> > to check that out for a wee bit of update and a LOT of information about
> > mkusb and the possibility of getting it included as a standard thing in
> > Lubuntu.
> >
> > We also discussed about a wee change to the meeting time. We are now
> > once a month, 2nd Wednesday, at 19:00 UTC. We've also included a little
> > tool to figure out the time in your area on the [agenda][2] page which
> > is updated for the next meeting already. Feel free to add any agenda
> > items you have in mind. Otherwise, just come and hang out.
> >
> > Also note that future meetings will be on #lubuntu-devel. This way we
> > have Meetingology to take care of logging and notes and stuff.
> >
> > If there's any other questions, comments, or concerns on the topics
> > brought up at today's meeting, please don't hesitate to drop a line!
> >
> > [1]: https://wiki.ubuntu.com/Lubuntu/IRC%20Meetings
> > [2]: https://wiki.ubuntu.com/Lubuntu/IRC%20Meetings/Agenda
> >
> > --
> > @wxl | http://polka.bike
> > Lubuntu Release Manager & Head of QA
> > Ubuntu PPC Point of Contact
> > Ubuntu Oregon LoCo Team Leader
> > Ubuntu Membership Board & LoCo Council Member
> > Eugene Unix & GNU/Linux User Group Co-Organizer
>
> Hi everybody,
>
> Here is a simple shell-script, that can help converting between UTC and
> local time, provided you have the correct local time in your computer.
> (Make it executable and put it in PATH. I put it in ~/bin)
>
> -----
> sudodus@ssd-grund ~ $ utc2local
> Usage:    /home/sudodus/bin/utc2local [utc-time]
>           /home/sudodus/bin/utc2local 'YEAR-mm-dd HH:MM-utc'
> Example:  /home/sudodus/bin/utc2local '2015-11-22 18:30-utc'
> ----------------------------------------------------------------
> Current UTC time = 2015-11-13 11:54
>
> ##### For the next meeting (the example is for my CET) #####
>
> sudodus@ssd-grund ~ $ utc2local '2015-12-09 19:00-utc'
> Usage:    /home/sudodus/bin/utc2local [utc-time]
>           /home/sudodus/bin/utc2local 'YEAR-mm-dd HH:MM-utc'
> Example:  /home/sudodus/bin/utc2local '2015-11-22 18:30-utc'
> ----------------------------------------------------------------
>   UTC time = 2015-12-09 19:00-utc
> Local time = 2015-12-09 20:00
> ----------------------------------------------------------------
> Locale: Wed Dec  9 20:00:00 CET 2015
> sudodus@ssd-grund ~ $
> -----
>
> Best regards
> Nio
>
>

References