Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia Programming Projects

You're reading from   Julia Programming Projects Learn Julia 1.x by building apps for data analysis, visualization, machine learning, and the web

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781788292740
Length 500 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Adrian Salceanu Adrian Salceanu
Author Profile Icon Adrian Salceanu
Adrian Salceanu
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started with Julia Programming FREE CHAPTER 2. Creating Our First Julia App 3. Setting Up the Wiki Game 4. Building the Wiki Game Web Crawler 5. Adding a Web UI for the Wiki Game 6. Implementing Recommender Systems with Julia 7. Machine Learning for Recommender Systems 8. Leveraging Unsupervised Learning Techniques 9. Working with Dates, Times, and Time Series 10. Time Series Forecasting 11. Creating Julia Packages 12. Other Books You May Enjoy

Adding support for time zones


As previously mentioned, by default, Julia's date/time objects operate in local time, completely ignoring time zones. However, we can easily extend them to become time-zone aware using the TimeZones package. Please install it in the usual way:

julia> using Pkg
pkg> add TimeZones

Once we inform the compiler that we'll be using TimeZones, a wealth of timezone-related functionalities become available at our fingertips.

We can start by exploring the available time zones:

julia> timezone_names() 
439-element Array{AbstractString,1}: 
 "Africa/Abidjan" 
 "Africa/Accra" 
# output truncated

Let's create a time zone object for Amsterdam:

julia> amstz = TimeZone("Europe/Amsterdam") 
Europe/Amsterdam (UTC+1/UTC+2)

In Julia, a TimeZone is an abstract type that represents information regarding a specific time zone, which means that it can't be instantiated—we can't create objects of this type. Instead, one of its two subtypes will be automatically used—VariableTimeZone...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image