Skip to main content

Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Letting front-end user set time zone

Following the example in the documentation, this code: <input type="datetime-local" name="fields[startDate][datetime]" value="{{ currentValue }}"> <select name=&...
Mosswalker's user avatar
2 votes
1 answer

Allow user to set timezone from within Craft when entering a time in a date/time field

We are creating a small site to manage meetings that take place in many timezones. Administrators of the site will create meetings on behalf of teams everywhere. They may be in pacific timezone and ...
kenyabob's user avatar
  • 121
1 vote
1 answer

Assets Error: Unknown or bad format (years) at position 0 (y)

I am getting a new error, after no apparent updates from me or the client. The error only appears on pages with this one particular field. "DateInterval::createFromDateString(): Unknown or bad ...
daver's user avatar
  • 21
1 vote
0 answers

Archiving by month and year - timezone could not be found error

Following the answer in this thread -Linking and showing archive by month by P&T has worked fine for previous sites but now I'm getting the following error. I've checked I have a Time zone ...
sarah3585's user avatar
  • 899
1 vote
1 answer

Date filtering returning wrong results - timezone issue?

I'm running into an issue where incorrect results are being returned when filtering Craft Commerce orders by date in a template. Can anyone help? I cannot figure out what is going on. FACTS: Craft ...
Anna_MediaGirl's user avatar
3 votes
1 answer

Pull DateTime field using alternate timezone?

I have a question regarding populating models, in that I have a DateTime field in my model that I'm pulling / populating from the database. The DateTime value does not include the timezone it was set ...
Rick Kukiela's user avatar
2 votes
0 answers

Timezone drama for events calendar

Working on site where there is events calendar of conferences and webinars. Users are (literally) all over the world. Trying to figure out how I am going to handle time zones. Factors: - Fields I am ...
Jono's user avatar
  • 41
1 vote
1 answer

iCal feed import - Timezone query

Has anyone got any experience working with iCal feeds - I have written a plugin utilising the CalFileParser library but the UK clock changes have thrown all the items out, so eg an all day event is ...
Cole Henley's user avatar
  • 1,741
1 vote
1 answer

How can I get the server's timezone in a Craft plugin?

I'm setting up cron jobs from my plugin and I need to format the date in the server's time zone. It looks like Craft is overriding the timezone set in php.ini because PHP's date_default_timezone_get() ...
Jameal G's user avatar
  • 266
3 votes
2 answers

Using user-selectable timezones to show localized post dates

In my user profiles, I have a text field where the user's timezone is set, in the standard America/New_York format. Craft's timezone is set to New York, and the server's timezone is set to UTC. I'm ...
Jeremy Gimbel's user avatar
1 vote
0 answers

forms.timeField not respecting time zone

I have a plugin that uses a datetime variable to record a class start time. When I save the training record the time is changed from local MDT to GMT into the database, and when displayed again it is ...
Jim Evans's user avatar
5 votes
2 answers

Get current date / time in specific timezone?

How can I get the current date / time for specific timezones? My local time is easy: {{ now|date("H:i") }} So how can I get this for New York? or Singapore?
Johannes Lamers's user avatar
4 votes
1 answer

What does the Timezone in Settings -> General represent?

Should it be set to the timezone of the server Craft is installed on, or the timezone of the current user, or something else? I can find no documentation about these settings anywhere.
Sandwich's user avatar
  • 636
1 vote
1 answer

expiryDate in craft_templatecaches

I've found this in the documenation: Dates and times are both formatted for the user’s preferred locale. They are displayed in the site’s timezone, however they get stored in UTC like all other ...
Christian Steger's user avatar
0 votes
1 answer

Timezone in Store Hours Plugin [closed]

I am located in Austria using Pixel & Tonic's Store Hours Plugin. The Timezone in Craft's settings is set to UTC+1 (CET) - Europe/Vienna. When I type in that it's opened from 3 - 6pm it outputs ...
user avatar
3 votes
1 answer

Do I need to change the date.timezone in php.ini?

If I set my timezone in server and in Craft general settings, do I still need to change it in php.ini? And how does Craft handle timezone in those three places?
mohd4482's user avatar
  • 612
2 votes
1 answer

Output DateTime in that timezone related to the current locale?

Is there a way to loop through a day in 15-minute intervals, with the output of said intervals being localizable? This (cringe-worthy) snippet should help explain what I'm trying to accomplish: <...
carlcs's user avatar
  • 36.3k