Hi,

To update anyone on the progress made via the currently pull requests on
github. The consensus is that the interface spec should be far simpler than
the initial proposed one, and now looks as follows:
<?php

namespace Psr\Clock;

interface ClockInterface
{
    /**
     * Returns the current time as a DateTimeImmutable Object
     */
    public function now(): \DateTimeImmutable;

}


After reaching out to several clock library authors. I have had positive
feedback from the most prominent library authors, and everyone else who has
commented on the PR is in general agreement on the spec. As this is my
first time working with getting something published as a standard I am not
sure what to do next, do I need to find a sponsor? How would I go about
that?

Link to spec:
https://github.com/php-fig/fig-standards/pull/1224/files

On Fri, Mar 5, 2021 at 6:42 PM Alessandro Lai <alessandro.la...@gmail.com>
wrote:

> If that could be of any help, I will remember you that we have a public
> Discord server, where you could invite potential WG members to discuss and
> organize.
>
> The server is reachable at https://discord.gg/php-fig/
>
> Ping me or other secretaries if you need a dedicated channel.
>
> Il giorno giovedì 4 marzo 2021 alle 23:24:02 UTC+1 Chris Seufert ha
> scritto:
>
>> That would be great, thank you.
>>
>> On Fri, Mar 5, 2021 at 12:37 AM Andreas Heigl <and...@heigl.org> wrote:
>>
>>> Hey all
>>>
>>> Am 04.03.21 um 13:34 schrieb Chris Seufert:
>>> > Hello,
>>> >
>>> > I would like to propose standardizing a clock interface for reading
>>> the
>>> > current time, date, timestamp, and timezone.
>>> >
>>> > The problems I hope to solve is when testing time sensitive code,
>>> there is
>>> > a unified way to represend the current time. I have run into several
>>> issues
>>> > doing this some of which are:
>>> > - Some library use different Clock interfaces / implementations.
>>> > - Its impossible to mock some calls to date and time without using a
>>> PHP
>>> > extension to override the current time & date.
>>> > - There are about 10 competing library implentations to this problem
>>> just
>>> > from a quck search on packagist
>>> >
>>> > The proposed interface would look like this:
>>> >
>>> > interface ClockInterface
>>> > {
>>> >     public function timestamp():int;
>>> >
>>> >     public function immutable():\DateTimeImmutable;
>>> >
>>> >     public function datetime():\DateTime
>>> >
>>> >      public function microtime():float
>>> >
>>> >      public function timezone():\DateTimeZone
>>> > }
>>> >
>>> > I have created a pull request for this here:
>>> > https://github.com/php-fig/fig-standards/pull/1224
>>> >
>>> > I am looking to find out if anyone is interesting in sponsoring this
>>> > Standard.
>>> >
>>> > I have enjoyed using the PSR-16 interopable caches, and also migrated
>>> a
>>> > large legacy application to use PSR-7/PSR-15 and also benefits from
>>> using
>>> > standard middlewares and request extensions, and hope this could
>>> provide a
>>> > similar experience in the future.
>>>
>>> I won't be able to act as sponsor but would be available for a working
>>> group if that is helpful.
>>>
>>> Cheers
>>>
>>> Andreas
>>> --
>>>                                                               ,,,
>>>                                                              (o o)
>>> +---------------------------------------------------------ooO-(_)-Ooo-+
>>> | Andreas Heigl                                                       |
>>> | mailto:and...@heigl.org                  N 50°22'59.5" E 08°23'58" |
>>> | https://andreas.heigl.org                                           |
>>> +---------------------------------------------------------------------+
>>> | https://hei.gl/appointmentwithandreas                               |
>>> +---------------------------------------------------------------------+
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "PHP Framework Interoperability Group" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/php-fig/lA8Lz0E4dWk/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> php-fig+u...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/php-fig/67a54cec-28bc-e547-6e7f-d6d1c77aa44a%40heigl.org
>>> .
>>>
>>
>>
>> --
>> Chris Seufert
>>
>> *M.* 0424 066 016  *T.* 03 9510 7477
>> *The Well* - 1 / 21 Wellington St, St Kilda, Victoria 3182, Australia
>> *modd.com.au <http://modd.com.au/> - udo.net.au
>> <http://udo.net.au/> - artsphere.com.au <http://artsphere.com.au/>*
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "PHP Framework Interoperability Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/php-fig/lA8Lz0E4dWk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> php-fig+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/72f0045b-c4c8-4768-ba8f-9657a91ce66an%40googlegroups.com
> <https://groups.google.com/d/msgid/php-fig/72f0045b-c4c8-4768-ba8f-9657a91ce66an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Chris Seufert

*M.* 0424 066 016  *T.* 03 9510 7477
*The Well* - 1 / 21 Wellington St, St Kilda, Victoria 3182, Australia
*modd.com.au <http://modd.com.au/> - udo.net.au
<http://udo.net.au/> - artsphere.com.au <http://artsphere.com.au/>*

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAN1g4SyPA9D8DDqQnFO6UWeQpessVLncem37YXOum_6EXseu1Q%40mail.gmail.com.

Reply via email to