Need help with now?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

erica
129 Stars 2 Forks MIT License 13 Commits 0 Opened issues

Description

Times around the world because no brain should have to work out what time it is in NYC or what time it is here when it's 4PM in London or what time 4PM in London is here...

Services available

!
?

Need anything else?

Contributors list

# 31,943
Objecti...
Shell
Markdow...
12 commits

Now

I wrote this first for sample code, then for myself, then for friends.

I didn't intend to push this out but darn if it isn't useful.

Usage

OVERVIEW: 

Check the time at a given location, "now Sao Paolo Brazil". Locations are diacritical and case insensitive. Use postcodes, cities, states, countries, even place names like "now Lincoln Memorial"

When it's this time here: "now --local 5PM Bath UK" When it's that time there: "now --remote 5PM Bath UK"

Valid time styles: 5PM, 5:30PM, 17:30, 1730. (No spaces.)

USAGE: now [--local ] [--remote ] [ ...]

ARGUMENTS:

OPTIONS: [email protected], -l, --at, --here, --local When it's this local time -r, --when, --there, --remote When it's this remote time -h, --help Show help information.

% now sao paolo brazil São Paulo 3:50:58 PM (GMT-3 Brasilia Standard Time) % now --local 4PM sao paolo brazil São Paulo 9:00:00 PM (GMT-3 Brasilia Standard Time) % now --remote 4PM sao paolo brazil Local 1:00:00 PM (GMT-3 Brasilia Standard Time)

Note: Bug filed because help is showing

when
and not
remote
as the value for the remote time.

Known issues

  • This can break at the edges of daylight time changes.
  • Casting times (local and remote) will break when VPNs change your "location"

Installation

  • Install homebrew.
  • Install mint with homebrew (
    brew install mint
    ).
  • From command line:
    mint install erica/now

Dependencies

Building

  • Build from Xcode (there's a custom build phase that installs to /usr/local/bin, so make sure you have write access)
  • Build from SPM:
    swift build
    in the top level directory. The built utility can be found in
    .build/debug/now
    . Run with
    swift run

Thanks

I just started this section so if you pitched in and I forgot to mention you, please let me know so I can update this!

Darren Ford (code review), Ryan Booker (code review and improvements, and not least Paul Hudson (for living in the wrong time zone)

Help Request

I want to add tests that will work regardless of where the utility is built and tested. (I do all tests outside of Xcode right now.)

If you have suggestions or pointers, please let me know. Thanks!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.