
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Timezone aware uses JavaScript to detect a user's timezone. After the user's own timezone is detected (i.e. after the first request), Time.zone
is set automatically in an around_filter
for each request. In your views and controllers, you can simply call Time.zone.now
and know this will be in the user's local time.
Add this line to your application's Gemfile:
gem 'timezone-aware'
Add timezone-aware.js
to application.js
//=require timezone-aware
And then execute:
$ bundle
Or install it yourself as:
$ gem install timezone-aware
Timezone aware automatically sets Time.zone
during each request. After the JavaScript determines the user's timezone (via jstz.js), we set a cookie time_zone
. Timezone aware then sets Time.zone
based on this cookie in an around_filter
.
Note: this is not thread safe as global Time.zone is being set for each request.
An example view: home.html.erb
The time is now <%= Time.zone.now %>
Converting time zone back and forth
Time.now.utc.in_time_zone(Time.zone)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that timezone-aware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.