https://twill.io logo
Join DiscordCommunities
Powered by
# ❓questions
  • k

    Kirk Bushell

    05/21/2021, 9:53 AM
    The article publish start date is set to 8am (incorrect), the now, is correct utc time, which at the time was 9.48am
  • k

    Kirk Bushell

    05/21/2021, 9:54 AM
    oh hang on, lemt me double check, I think my format is wrong
  • k

    Kirk Bushell

    05/21/2021, 9:55 AM
    yeah, there we go
  • k

    Kirk Bushell

    05/21/2021, 9:55 AM
    my bad 🙂
  • k

    Kirk Bushell

    05/21/2021, 9:55 AM
    big H, not small h for hour hehe
  • i

    ifox

    05/21/2021, 9:55 AM
    ok good haha
  • k

    Kirk Bushell

    05/21/2021, 9:55 AM
    the fact remains however - it's not converting to UTC
  • i

    ifox

    05/21/2021, 9:56 AM
    right
  • k

    Kirk Bushell

    05/21/2021, 9:56 AM
    Is there another configuration value I need to update?
  • k

    Kirk Bushell

    05/21/2021, 9:57 AM
    wait a second...
  • k

    Kirk Bushell

    05/21/2021, 9:57 AM
    Carbon doesn't convert to UTC automatically
  • k

    Kirk Bushell

    05/21/2021, 9:57 AM
    🤦‍♂️
  • i

    ifox

    05/21/2021, 9:57 AM
    there shouldn't be, no
  • k

    Kirk Bushell

    05/21/2021, 9:58 AM
    I was assuming the value was coming through to the server in UTC, I assume the datepicker isn't doing that, but laravel is?
  • k

    Kirk Bushell

    05/21/2021, 10:00 AM
    Na, still not on it. Hmmm
  • d

    domihagen

    05/21/2021, 10:01 AM
    don´t know if there is a difference, if you use ->isoFormat() instead of ->format()
  • k

    Kirk Bushell

    05/21/2021, 10:01 AM
    It's definitely not converting to UTC.
  • k

    Kirk Bushell

    05/21/2021, 10:01 AM
    going straight into the database in aest
  • k

    Kirk Bushell

    05/21/2021, 10:03 AM
    It shoudl be going in as 10am
  • i

    ifox

    05/21/2021, 10:07 AM
    I could swear we had dealt with that but I see that this remains an issue. The frontend would need to send the client timezone or UTC offset for us to be able to convert to UTC before saving.
  • k

    Kirk Bushell

    05/21/2021, 10:07 AM
    I think the issue is that the date/time picker isn't converting before it's sent to the server
  • k

    Kirk Bushell

    05/21/2021, 10:07 AM
    Correct
  • k

    Kirk Bushell

    05/21/2021, 10:08 AM
    I had weird publishing errors on rathetimes.com and thought maybe I just wasn't entering dates properly, because I'd see on my date outputs at times that the publish time was in the future lol
  • k

    Kirk Bushell

    05/21/2021, 10:08 AM
    I'll raise an issue, @User
  • i

    ifox

    05/21/2021, 10:08 AM
    yeah makes sense, sorry about that
  • k

    Kirk Bushell

    05/21/2021, 10:09 AM
    All good, I'll just have to wait on this feature until it's fixed. I am writing a browser push notification system and I need to ensure notifications only go out when articles are published, but I wasn't seeing it line up properly
  • k

    Kirk Bushell

    05/21/2021, 10:10 AM
    What it also means is that it's not converting it back, either.
  • k

    Kirk Bushell

    05/21/2021, 10:10 AM
    As the values I'm entering are what I'm getting back.
  • k

    Kirk Bushell

    05/21/2021, 10:11 AM
    Note, I am referring specifically to the publish_start_date, so perhaps that's alittle different to the date picker in blocks?
  • i

    ifox

    05/21/2021, 10:14 AM
    https://github.com/area17/twill/blob/2.x/src/Repositories/Behaviors/HandleDates.php
1...101112...484Latest