magro / kryo-serializers

More kryo serializers
Apache License 2.0
381 stars 120 forks source link

remove the 'default tz optimization' from JodaDateTimeSerializer #41

Closed tinnet closed 9 years ago

tinnet commented 9 years ago

My attempt to close https://github.com/magro/kryo-serializers/issues/30

HTH :)

tinnet commented 9 years ago

relevant snippets from org.joda.time.DateTime:

   ...
    /**
     * Constructs an instance set to the current system millisecond time
     * using <code>ISOChronology</code> in the default time zone.
     */
    public DateTime() {
        super();
    }
   ...
    /**
     * Constructs an instance set to the current system millisecond time
     * using the specified chronology.
     * <p>
     * If the chronology is null, <code>ISOChronology</code>
     * in the default time zone is used.
     *
     * @param chronology  the chronology, null means ISOChronology in default zone
     */
    public DateTime(Chronology chronology) {
        super(chronology);
    }
   ...
    /**
     * Gets the time zone of the instant from the chronology.
     * 
     * @return the DateTimeZone that the instant is using, *never null*
     */
    public DateTimeZone getZone() {
        return getChronology().getZone();
    }
magro commented 9 years ago

Great, thanks for the PR! Do you need this to be released soon?

tinnet commented 9 years ago

no pressure, we're doing the same locally already, would just be nicer to tell our callers to use your lib instead of telling them to copy&paste our Serializer in future :)

magro commented 9 years ago

Ok, released as 0.36 :-)

tinnet commented 9 years ago

wow, thanks :)