• Hi

    I need to change the plugin so that the times available etc. are displayed in the customer’s timezone. I know that this feature isn’t available out of the box and I will need to add it myself.

    The customer is manually setting their timezone when they sign up.

    To enable the correct time to be displayed, in my head I’m thinking it is simply a case of using DateTime() with the timezone and let PHP do it’s magic.

    (Obviously I would be editing the core files so updates will be an issue).

    Am I missing something here?

    https://www.ads-software.com/plugins/appointments/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey there ch1n3s3b0y,

    Hope you’re well today ??

    Currently Appointments plugin is working with only with one time zone which is being set in Settings -> General -> Timezone.

    We already had similar requests but due to plugin design and complexity of the feature even though we have this considered possible feature for future development it is not something that will definitely be added to the plugin since a lot of changes in the code will have to be made in order for this to work.

    Please also take into consideration that the whole gCal integration is also revolved around this timezone option so you don’t create an issue there.

    Best regards,
    Bojan

    Thread Starter ch1n3s3b0y

    (@ch1n3s3b0y)

    Hi Bojan

    Thanks for the response. I had a look through and I can see there will be quite a few places in the code that will need to be changed. I guess I’m thinking that the relative time (after timezone adjustment) is only for display purposes. In reality the time is still the same according to the time stored on the server, it is just that the user needs to see an adjusted time?

    e.g. For the places where the front end time is displayed we should be able to just run the time through the datetime class with the datetimezone function right? Or am I simplifying it more than it will actually be?

    Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey ch1n3s3b0y,

    You’re definitely simplifying it.

    The problem with that is that you get user time zone in the client whereas the plugin is being executed in the server so making changes like that would definitely be more complex then just running few functions.

    Hope this makes sense ??

    Best regards,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Date and Time to Client's Timezone with DateTime()’ is closed to new replies.