0.0
The project is in a healthy, maintained state
This Ruby gem allows you to retrieve the current local time and UTC offset for a given city name using the 'timezone' gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0
 Project Readme

This gem, LocalTimeGem, provides a convenient way to retrieve the current local time and UTC difference for a given city.

Features:

Retrieves local time based on city name. Calculates the difference between local time and UTC (Coordinated Universal Time). Installation:

There are two ways to install LocalTimeGem:

Using RubyGems.org (after release):

Once the gem is officially released on RubyGems.org, you can install it using the following command:

Bash gem install local_time_gem Use code with caution. From source (during development):

If you'd like to use the gem locally during development, clone the repository and run the following command:

Bash bundle install # Install dependencies bundle exec rake install # Install the gem locally Use code with caution. Usage:

Once installed, you can use the LocalTimeGem module in your Ruby code:

Ruby require 'local_time_gem'

Get local time information for London

local_time_data = LocalTimeGem.get_time('Europe/London')

puts "Local Time in London: #{local_time_data[:local_time]}" puts "UTC Difference: #{local_time_data[:utc_difference]} hours" Use code with caution. This will output the current local time and UTC difference for London.

Development:

If you'd like to contribute to the development of LocalTimeGem, you can follow these steps:

Clone the repository:

Bash git clone https://github.com/[USERNAME]/local_time_gem.git Use code with caution. Replace [USERNAME] with your actual GitHub username.

Install dependencies:

Bash bundle install Use code with caution. Run tests (optional):

Write unit tests for your code and run them before making changes.

Contributing:

Bug reports and pull requests are welcome! Submit them on GitHub at https://github.com/[USERNAME]/local_time_gem.

Note:

Replace [USERNAME] in the development and contributing sections with your actual GitHub username. This updated README file provides a clear description of the gem, installation instructions, usage examples, and contribution guidelines. It also removes the placeholder text and ensures security best practices are followed.