Skip to content

trouble accessing dates via Java API #101

@c-dilks

Description

@c-dilks

java.sql.Time does not provide the date (getDate() is deprecated); thus it does not seem to be possible to get the date from a Time condition:

fun toTime(): java.sql.Time {

Reproducer in groovy:

import org.rcdb.RCDB
def db = RCDB.createProvider('mysql://rcdb@clasdb-farm.jlab.org/rcdb')
db.connect()
def result = db.getCondition(5052, 'run_start_time')
println "time = ${result.toTime()}"
println "date = ${result.toTime().getDate()}" // fails

Is there some other way to get the date with the Java API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions