Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD3261796B for ; Mon, 9 Mar 2015 19:33:38 +0000 (UTC) Received: (qmail 22678 invoked by uid 500); 9 Mar 2015 19:33:38 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 22611 invoked by uid 500); 9 Mar 2015 19:33:38 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 22599 invoked by uid 99); 9 Mar 2015 19:33:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 19:33:38 +0000 Date: Mon, 9 Mar 2015 19:33:38 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AMQ-5645) CronParser.getNextScheduledTime() for the first day of every month MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-5645?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQ-5645. ------------------------------- Resolution: Fixed Fix Version/s: 5.12.0 Assignee: Timothy Bish Nice catch. Reviewed the changes, looks good. Patch is applied on master. > CronParser.getNextScheduledTime() for the first day of every month > ------------------------------------------------------------------ > > Key: AMQ-5645 > URL: https://issues.apache.org/jira/browse/AMQ-5645 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.9.0, 5.11.0 > Environment: Windows, Java 1.6 > Reporter: Toni Ram=C3=ADrez > Assignee: Timothy Bish > Fix For: 5.12.0 > > > When we try to get a NextSecheduledTime for a cron string that should ret= urn next month's first day ("0 1 1 * *") we get current month's last day. > For example: > =09public static void main(String[] args){ > =09=09 > =09=09try{ > =09=09 > =09=09=09Date miFecha =3D new Date(CronParser.getNextScheduledTime("0 1 1= * *", System.currentTimeMillis())); > =09=09=09=09 > =09=09=09System.out.println(miFecha); > =09=09=09 > =09=09=09 > =09=09}catch(Exception e){ > =09=09 > =09=09=09e.printStackTrace(); > =09=09}=09 > =09=09 > =09=09 > =09} > This prints: > Tue Mar 31 01:00:00 CEST 2015 -- This message was sent by Atlassian JIRA (v6.3.4#6332)