Git Product home page Git Product logo

timezones's Introduction

Your Own URL Shortener

CI Scrutinizer Code Quality PHP Version Support Packagist OpenCollective OpenCollective

YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener, on your server. You'll have full control over your data, detailed stats, analytics, plugins, and more. It's free and open-source.

Quick Start

Get YOURLS :

  • Download the latest release
  • Using Composer? You can simply composer create-project yourls/yourls . in an empty directory.

Install YOURLS:

  • Read yourls.org for starters
  • The complete documentation is on docs.yourls.org and contains everything from beginners to experts.

Community news, tips and tricks

Contributing

Feature suggestion? Bug to report?

Before opening any issue, please search for existing issues (open and closed) and read the Contributing Guidelines.

Backers

Do you use and enjoy YOURLS? Become a backer and show your support to our open source project.

Sponsors

Does your company use YOURLS? Ask your manager or marketing team if your company would be interested in supporting our project. Your company logo will show here. Help support our open-source development efforts by becoming a sponsor.

License

Free software. Do whatever the hell you want with it.
YOURLS is released under the MIT license.

timezones's People

Contributors

clmcavaney avatar jeremykeusters avatar ozh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timezones's Issues

Current plans

Build on YOURLS/YOURLS#2633 to

  • have timezone management compatible "core" (the functions in function files), but not ship a new core plugin. This way, if the plugin has bugs, or if we overlook a trivial feature, we can quickly update it without needing to push a new YOURLS release that would impact everybody including people not using the core plugin
  • have a timezone management plugin here, with its own release cycle. Eventually, depending on adoption and feedback, it could become a core plugin like "random keywords" became.

TODO

  • clean up PR 2633 and move plugin code here (@JeremyKeusters ?)
  • mark this repo public as soon as initial import is made so anyone can have their say
  • eventually I think the plugin needs to be fully i18n ready. I guess people interested in timezones may be using localized versions.

Unknown or bad timezone (UTC-8) in timezones/plugin.php

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Self troubleshooting

Version

1.8.1

Description

Choosing UTC -8 in the pull down menu caused an error:

Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (UTC-8) in /home/xxxx/yourls/plugins/timezones/plugin.php:81 
Stack trace: 
#0 /home/xxxx/yourls/user/plugins/timezones/plugin.php(81): DateTimeZone->__construct('UTC-8') 
#1 /home/xxxx/yourls/user/plugins/timezones/plugin.php(95): yourls_tzp_timezoned_offset('UTC-8') 
#2 /home/xxxx/yourls/user/plugins/timezones/admin.php(46): yourls_tzp_timezoned_timestamp(1642550402, 'UTC-8') 
#3 /home/xxxx/yourls/includes/functions-plugins.php(775): yourls_tzp_admin_page() 
#4 /home/xxxx/yourls/admin/plugins.php(8): yourls_plugin_admin_page('time_zone_confi...') 
#5 {main} thrown in /home/xxxx/yourls/user/plugins/timezones/plugin.php on line 81

Expectation

No response

Reproduction steps

I simply chose UTC -8 in the pull down menu instead of a city name.

Context

No response

Missing Australia!

G'day,

In this array, you are missing Australia:

timezones/admin.php

Lines 165 to 172 in e366956

'Africa' => DateTimeZone::AFRICA,
'America' => DateTimeZone::AMERICA,
'Antarctica' => DateTimeZone::ANTARCTICA,
'Asia' => DateTimeZone::ASIA,
'Atlantic' => DateTimeZone::ATLANTIC,
'Europe' => DateTimeZone::EUROPE,
'Indian' => DateTimeZone::INDIAN,
'Pacific' => DateTimeZone::PACIFIC,

It is in the PHP class:
https://www.php.net/manual/en/class.datetimezone.php#datetimezone.constants.australia

I will get a pull request ready to fix.

Regards,
Christopher

Errors when trying to change timezone

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Self troubleshooting

Version

1.19.1

Description

When attempting to change the timezone the following error is shown
Note that I'm using PHP 8.0.14
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1364 Field 'option_id' doesn't have a default value in \includes\vendor\aura\sql\src\AbstractExtendedPdo.php:565 Stack trace: #0 \includes\vendor\aura\sql\src\AbstractExtendedPdo.php(565): PDOStatement->execute() #1 \includes\vendor\aura\sql\src\AbstractExtendedPdo.php(237): Aura\Sql\AbstractExtendedPdo->perform('INSERT INTO you...', Array) #2 \includes\Database\Options.php(211): Aura\Sql\AbstractExtendedPdo->fetchAffected('INSERT INTO you...', Array) #3 \includes\Database\Options.php(159): YOURLS\Database\Options->add('timezone', Array) #4 \includes\functions-options.php(71): YOURLS\Database\Options->update('timezone', Array) #5 \user\plugins\timezones\admin.php(270): yourls_update_option('timezone', Array) #6 \user\plugins\timezones\admin.php(15): yourls_tzp_config_update_settings() #7 \includes\functions-plugins.php(815): yourls_tzp_admin_page() #8 \admin\plugins.php(8): yourls_plugin_admin_page('time_zone_confi...') #9 {main} thrown in \includes\vendor\aura\sql\src\AbstractExtendedPdo.php on line 565

Expectation

No response

Reproduction steps

  1. Install plugin
  2. Activate plugin
  3. try and change timezone

Context

No response

Creation time is off double the hours from UTC

Describe the bug
When creating a new link, the datetime shown in the admin is off by double the amount of hours from UTC. I set up my timezone as America/Los_Angeles, which is 8 hours less than UTC. However when I create a link, the time shown is 8 hours earlier than the local time, so it's 16 hours earlier than UTC.

To Reproduce
Create a new shortened link in the admin.

Expected behavior
The current date and time should be shown.

Actual behavior
The time shown is 8 hours earlier than what it actually is.

Versions
Yourls 1.8
CentOS 7.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.