Examples of withMillisOfSecond()


Examples of org.joda.time.DateTime.withMillisOfSecond()

            dt = dt.withDayOfMonth(((p >>> 5& 0x1F));
            dt = dt.withHourOfDay((p & 0x1F));
            dt = dt.withMinuteOfHour(((s >>> 26) & 0x3F));
            dt = dt.withSecondOfMinute(((s >>> 20) & 0x3F));
            // marsaling dumps usec, not msec
            dt = dt.withMillisOfSecond((s & 0xFFFFF) / 1000);
            dt = dt.withZone(getLocalTimeZone(runtime));
            time.setUSec((s & 0xFFFFF) % 1000);
        }
        time.setDateTime(dt);
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

            dt = dt.withDayOfMonth(((p >>> 5& 0x1F));
            dt = dt.withHourOfDay((p & 0x1F));
            dt = dt.withMinuteOfHour(((s >>> 26) & 0x3F));
            dt = dt.withSecondOfMinute(((s >>> 20) & 0x3F));
            // marsaling dumps usec, not msec
            dt = dt.withMillisOfSecond((s & 0xFFFFF) / 1000);
            time.setUSec((s & 0xFFFFF) % 1000);
        }
        time.setDateTime(dt);
        if (!utc) time.localtime();
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

    @Test
    public void testTruncateTimestamp()
    {
        DateTime result = TIMESTAMP;
        result = result.withMillisOfSecond(0);
        assertFunction("date_trunc('second', " + TIMESTAMP_LITERAL + ")", toTimestamp(result));

        result = result.withSecondOfMinute(0);
        assertFunction("date_trunc('minute', " + TIMESTAMP_LITERAL + ")", toTimestamp(result));
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

        result = result.withMonthOfYear(1);
        assertFunction("date_trunc('year', " + TIMESTAMP_LITERAL + ")", toTimestamp(result));

        result = WEIRD_TIMESTAMP;
        result = result.withMillisOfSecond(0);
        assertFunction("date_trunc('second', " + WEIRD_TIMESTAMP_LITERAL + ")", toTimestampWithTimeZone(result));

        result = result.withSecondOfMinute(0);
        assertFunction("date_trunc('minute', " + WEIRD_TIMESTAMP_LITERAL + ")", toTimestampWithTimeZone(result));
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

    @Test
    public void testTruncateTime()
    {
        DateTime result = TIME;
        result = result.withMillisOfSecond(0);
        assertFunction("date_trunc('second', " + TIME_LITERAL + ")", toTime(result));

        result = result.withSecondOfMinute(0);
        assertFunction("date_trunc('minute', " + TIME_LITERAL + ")", toTime(result));
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

        result = result.withMinuteOfHour(0);
        assertFunction("date_trunc('hour', " + TIME_LITERAL + ")", toTime(result));

        result = WEIRD_TIME;
        result = result.withMillisOfSecond(0);
        assertFunction("date_trunc('second', " + WEIRD_TIME_LITERAL + ")", toTimeWithTimeZone(result));

        result = result.withSecondOfMinute(0);
        assertFunction("date_trunc('minute', " + WEIRD_TIME_LITERAL + ")", toTimeWithTimeZone(result));
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

            dt = dt.withDayOfMonth(((p >>> 5& 0x1F));
            dt = dt.withHourOfDay((p & 0x1F));
            dt = dt.withMinuteOfHour(((s >>> 26) & 0x3F));
            dt = dt.withSecondOfMinute(((s >>> 20) & 0x3F));
            // marsaling dumps usec, not msec
            dt = dt.withMillisOfSecond((s & 0xFFFFF) / 1000);
            time.setUSec((s & 0xFFFFF) % 1000);
        }
        time.setDateTime(dt);
        if (!utc) time.localtime();
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

            dt = dt.withDayOfMonth(((p >>> 5& 0x1F));
            dt = dt.withHourOfDay((p & 0x1F));
            dt = dt.withMinuteOfHour(((s >>> 26) & 0x3F));
            dt = dt.withSecondOfMinute(((s >>> 20) & 0x3F));
            // marsaling dumps usec, not msec
            dt = dt.withMillisOfSecond((s & 0xFFFFF) / 1000);
            time.setUSec((s & 0xFFFFF) % 1000);
        }
        time.setDateTime(dt);
        if (!utc) time.localtime();
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

        this.logoControllerUtils = logoControllerUtils;
        this.favIconIcoControllerUtils = favIconIcoControllerUtils;
        this.favIconPngControllerUtils = favIconPngControllerUtils;

        DateTime now = new DateTime();
        startTime = now.withMillisOfSecond(0).toDate();
    }

    /**
     * Gets current forum logo
     *
 
View Full Code Here

Examples of org.joda.time.DateTime.withMillisOfSecond()

                LOGGER.error("Can't convert fav icon to *.ico format", e);
            }
        }

        DateTime now = new DateTime();
        now = now.withMillisOfSecond(0);
        forumComponent.setProperty(COMPONENT_INFO_CHANGE_DATE_PROPERTY, String.valueOf(now.getMillis()));
    }

    /**
     * {@inheritDoc}
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.