64°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Day 23: Open Sourcing my Timezone Library #100DaysOfIndieWeb

    January 12, 2017

    Today I published my code for finding the timezone of a specific location as a standalone library.

    Previously it was part of my Atlas web service, which provides various functions such as generating static maps, geocoding, and looking up weather information. I started wanting specifically the function of finding the timezone for a given location in other projects such as XRay and Quill. This allows me to do things like set the proper timezone of an Instagram photo based on the photo's location, since Instagram dates are always set to UTC.

    A few days ago I copied the code from Atlas to XRay, with a "TODO" reminding me to publish it as a library soon. Today I wanted to use it in Quill, and I decided that three copies of the code floating around would not be a good idea. Time to publish as a library!

    Luckily this code was relatively small and already in only one file. Here's what it took to publish it as a library.

    • Created a new GitHub repo for the library
    • Wrote a README with a description and sample code
    • Chose a license for the project, and added the license file and CONTRIBUTING.md file
    • Copied the code from Atlas to the new repository, and verified that it had no additional dependencies
    • Created composer.json describing the library to prepare for publishing on Packagist
    • Committed and tagged version 0.1.0
    • Updated Atlas and XRay code to use this library, removing the old code from the projects
    • Updated XRay composer.json to load the library directly from GitHub, since it is not yet published on Packagist (example config)
    • Tested that XRay can use the new library
    • Created a new package on Packagist, and configured the GitHub service hook so that it's automatically updated when I push to GitHub
    • Updated XRay and Atlas' composer.json to load the new library from Packagist

    Hopefully this will be useful to others!

    Mountain View, California
    Thu, Jan 12, 2017 10:32am -08:00 #100daysofindieweb #indieweb #atlas #timezone #p3k
    3 mentions

    Other Mentions

    • Aaron Parecki aaronparecki.com
      My 2017 Year in Review
      Thu, Jan 4, 2018 2:40pm -08:00
    • Aaron Parecki aaronparecki.com
      Week in Review #100DaysOfIndieWeb
      Sat, Jan 14, 2017 10:48am -08:00
    • 100 Days of IndieWeb aaronparecki.com/tag/100daysofindieweb
      Day 23: Open Sourcing my Timezone Library #100DaysOfIndieWeb: aaronparecki.com/2017/01/12/8/d…
      Thu, Jan 12, 2017 6:32pm +00:00 (via brid-gy.appspot.com)
Posted in /articles using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv