[haiku-development] Fwd: [haiku-commits] haiku: hrev46240 - src/kits/network/libnetapi headers/os/net

  • From: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Oct 2013 16:42:00 +1300

> diff --git a/src/kits/network/libnetapi/NetworkCookie.cpp
> b/src/kits/network/libnetapi/NetworkCookie.cpp
> index 615e218..0dcef0e 100644
> --- a/src/kits/network/libnetapi/NetworkCookie.cpp
> +++ b/src/kits/network/libnetapi/NetworkCookie.cpp
> @@ -245,7 +245,7 @@ BNetworkCookie&
>  BNetworkCookie::SetMaxAge(int32 maxAge)
>  {
>         BDateTime expiration = BDateTime::CurrentDateTime(B_GMT_TIME);
> -       expiration.Time().AddSeconds(maxAge);
> +       expiration.SetTime_t(expiration.Time_t() + maxAge);
>         return SetExpirationDate(expiration);
>  }
>

I started working on a patch to add the AddXyz() functions to BDateTime
itself so that the overflow/underflow could be handled appropriately rather
than using the workaround above, but overall the current API seems a bit
too basic.

So instead, I'd like to try porting noda-time to the Haiku API to replace
the current date/time classes in the support kit.

Thoughts?

Other related posts: