Results 1 to 3 of 3

Thread: gcalcli 24 hour format

  1. #1
    Join Date
    Apr 2007
    Beans
    49

    gcalcli 24 hour format

    There was just one thing I didn't like about gcalcli, and it was that I couldn't specify which time format I want to use. I live in Belgium where we're used to using the 24 hour format. So after some research, I got gcalcli to display in 24 hour format.

    I made a diff file from the original and edited file so I could share it here:

    Code:
    391c391
    <                 tmpTimeStr = eventStartDateTime.strftime("%l:%M") + meridiem
    ---
    >                 tmpTimeStr = eventStartDateTime.strftime("%H:%M")
    605c605
    <         timeFormat = '%l:%M'
    ---
    >         timeFormat = '%H:%M'
    621c621
    <             tmpTimeStr = eventStartDateTime.strftime(timeFormat) + meridiem
    ---
    >             tmpTimeStr = eventStartDateTime.strftime(timeFormat)
    859c859
    <             tmpTimeStr = eventStartDateTime.strftime('%l:%M') + meridiem
    ---
    >             tmpTimeStr = eventStartDateTime.strftime('%H:%M')
    If you put this in a file called gcalcli.diff in your home folder, you can patch the file like this:

    Code:
    sudo patch /etc/usr/gcalcli ~/gcalcli.diff
    Maybe I'll try and set it up so you can specify it in ~/.gcalcli when I've got some time to spare

  2. #2
    Join Date
    Jun 2007
    Beans
    20

    Re: gcalcli 24 hour format

    Thanks a lot. I was wondering whether I missed some option of the configuration but apparently the time format is hard coded. Thanks for the diff.

  3. #3
    Join Date
    Apr 2007
    Location
    Malmö, Sweden
    Beans
    9
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: gcalcli 24 hour format

    thanks a lot for the patch! but...

    Code:
    sudo patch /etc/usr/gcalcli ~/gcalcli.diff
    should really be

    Code:
    sudo patch /usr/bin/gcalcli ~/gcalcli.diff
    right?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •