Jump to content

Search the Community

Showing results for tags 'timezone'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 5 results

  1. Hi all, I've just noticed on the site that I'm developing, that the time is wrong for the $page->created field. In the config.php file I have the timezone set to $config->timezone = 'Europe/London'; The date is correct, but the time is out. It is currently 21.35 where I am, but the time that's displayed in the info box for the page (in the admin) is 14:35. So it's a few hours out, and I can't understand why? Any suggestions welcome.
  2. I installed a module and noticed that the "Installed Date" in Module Information showed "2 hours from now". I also noticed that after I modified a page, the "Last Modified Date" showed the date and time, plus in parenthesis "2 hours from now". I am in Eastern (New York) time, the server is in Central (Dallas) time, and the physical location of the entity for whom I built the site in in Pacific (Los Angeles) time. When I installed the site, I changed the timezone to Los Angeles (if I recall correctly, it defaulted to Dallas), so now in my config file I have: $config->timezone = 'America/Los_Angeles'; My question is twofold: 1. Should $config->timezone correspond to the servers timezone, or my (or the client's) timezone? 2. Is there any problem if it's set incorrectly? Thanks!! PW 3.0.42
  3. <link type='text/css' href='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.css?v=103' rel='stylesheet' /> <link type='text/css' href='/wire/modules/Inputfield/InputfieldCheckboxes/InputfieldCheckboxes.css?v=100' rel='stylesheet' /> <link type='text/css' href='/wire/templates-admin/styles/inputfields.css' rel='stylesheet' /> <link type='text/css' href='/wire/templates-admin/styles/JqueryUI/JqueryUI.css' rel='stylesheet' /> <link type='text/css' href='/wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.css?v=103' rel='stylesheet' /> <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=162'></script> <script type='text/javascript' src='/wire/modules/Jquery/JqueryUI/JqueryUI.js?v=180'></script> <script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.js?v=103'></script> <script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.js'></script> <?php // create a selctor for Date and time $field = $modules->get("InputfieldDatetime"); $field->label = "Preferred appointment day"; $field->attr("id+name","preferredday"); $field->required = 1; $field->datepicker = 1; // picker on Click $field->dateInputFormat = 'd/m/Y'; $field->timeInputFormat = 'g:ia'; $form->append($field); ?> sorry in advance as I'm on into my second week of learning PHP and PW if my coding is bad to say the least The issue I'm have is that with the above code I'm getting "Millisecond", "Microsecond","Time Zone" and "Now" Button and would like to not show these option. also as a stretch and pushing the limits of asking for help changing the time to be a select box from 7:00AM to 4:00PM broken into half hour blocks I've attached the whole file if it helps. Finally I have to say it may be only a week or 2 but the support and information I have been able to find in these forums has made the process this far an easy ride Tenant Form.php
  4. Hi there, can't seem to get my head around handling user timezones the right way and hope to get some feedback from people more knowledgeable than me. My scenario: Users can set publishing date/time for pages they create through a frontend form. These should be saved in the users' timezone. I have a date field for publishing time. PW saves dates as unix timestamps to the DB. For conversion of the date/time to the timestamp PW uses the default server time zone setting (in my case Europe/Berln). Now when a user in timezone America/New_York creates a page and sets the publishing date, it will be converted to a timestamp using the server timezone Europe/Berlin and saved to the DB. Later the user checks if his page is being published at the set time in New York. But it will be published at the wrong time because the user is in a different timezone. I assume it would be best to convert the publishing date/time to a timestamp using the user timezone and save that to the DB. Am I right here? How would I accomplish that? I found date_default_timezone_set. Can I simply use this to set the user timezone before I save values, like date_default_timezone_set($userTimezone); // where $userTimezone is a string like "America/New_York" $editpage->of(false); foreach($adform as $field) { // loop through all fields and save them if(in_array($field->name, $ignorefields)) continue; $editpage->set($field->name, $field->value); } $editpage->of(true); date_default_timezone_set($config->timezone); // do I have to set it back to server timezone here?
  5. hello forum i have insert a datetime field and it shows me the correct day with wrong hour, i changed the $config->timezone inside site/config.php from America/New_York to Europe/Athens as seen here but then i get (31 December 1969 7:00 pm) i have try and with other europe citys and i get the same date i do something wrong? thanks.
×
×
  • Create New...